Skip to content
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

Merged
merged 1 commit into from
Sep 16, 2021

Conversation

Jeffwan
Copy link
Collaborator

@Jeffwan Jeffwan commented Sep 14, 2021

Address #30 #25 #24 This change helps resolve CI problem. check #30 for more details.

  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

/cc @akanso @chenk008 @chaomengyuan

@Jeffwan Jeffwan force-pushed the kuberay_upgrade_kb branch 5 times, most recently from e6f9c61 to 4b536a3 Compare September 14, 2021 06:13
@Jeffwan Jeffwan changed the title Upgrade Kubebuilder to 3.0.0 Upgrade Kubebuilder to 3.0.0 and optimize Github workflow Sep 14, 2021
@@ -101,10 +101,8 @@ const (
)

// RayCluster is the Schema for the RayClusters API
// +genclient
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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'
Copy link
Collaborator Author

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}}
Copy link
Collaborator Author

@Jeffwan Jeffwan Sep 14, 2021

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.

ray-operator/main.go Outdated Show resolved Hide resolved
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>
@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Sep 16, 2021

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

@Jeffwan Jeffwan merged commit d5b327a into ray-project:master Sep 16, 2021
@Jeffwan Jeffwan deleted the kuberay_upgrade_kb branch September 16, 2021 16:51
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants