-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Kubebuilder to 3.0.0 and optimize Github workflow #31
Conversation
e6f9c61
to
4b536a3
Compare
@@ -101,10 +101,8 @@ const ( | |||
) | |||
|
|||
// RayCluster is the Schema for the RayClusters API | |||
// +genclient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can replace the +k8s:deepcopy-gen:interfaces=...
marker (which is deprecated in kubebuilder) with +kubebuilder:object:root=true.
We don’t need the following markers any more (they’re not used anymore, and are relics from much older versions of KubeBuilder):
// +genclient
// +k8s:openapi-gen=true
source: https://book.kubebuilder.io/migration/legacy/migration_guide_v1tov2.html
@@ -1,6 +1,6 @@ | |||
|
|||
# Image URL to use all building/pushing image targets | |||
IMG ?= ray-controller:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make files comes from kubebuilder v3.0.0 and it gives more commands to use
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.13 | ||
go-version: '~1.15.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pin golang version
# When checking out the repository that | ||
# triggered a workflow, this defaults to the reference or SHA for that event. | ||
# Default value should work for both pull_request and merge(push) event. | ||
ref: ${{github.event.pull_request.head.sha}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my personal repo testing, this works for push event (post-submit) as well.
1. Deprecate genclient and deepcopy-gen markers 2. Add health/ready check and use nonroot user in deployment 3. Fix github workflow issue Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
4b536a3
to
a4a97a2
Compare
I will merge this since it's blocking CI. @akanso if you can some comments on the github workflow change, I will address it in separate PR |
…t#31) 1. Deprecate genclient and deepcopy-gen markers 2. Add health/ready check and use nonroot user in deployment 3. Fix github workflow issue Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Address #30 #25 #24 This change helps resolve CI problem. check #30 for more details.
Signed-off-by: Jiaxin Shan seedjeffwan@gmail.com
/cc @akanso @chenk008 @chaomengyuan