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 the version of kind and controller-gen to adapt k8s version upgrade #3404

Merged
merged 2 commits into from May 14, 2024

Conversation

guoqinwill
Copy link
Contributor

@guoqinwill guoqinwill commented Apr 12, 2024

Upgrade the version of kind and controller-gen to adapt k8s version upgrade.

@volcano-sh-bot volcano-sh-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 12, 2024
@guoqinwill guoqinwill force-pushed the updatek8s_todo branch 2 times, most recently from bfe26d5 to 4cabf0c Compare April 12, 2024 10:08
@@ -108,10 +108,6 @@ manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1;./vendor/volcano.sh/apis/pkg/apis/batch/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/bus/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" output:crd:artifacts:config=config/crd/volcano/bases
# generate volcano job crd yaml without description to avoid yaml size limit when using `kubectl apply`
$(CONTROLLER_GEN) $(CRD_OPTIONS_EXCLUDE_DESCRIPTION) paths="./vendor/volcano.sh/apis/pkg/apis/batch/v1alpha1" output:crd:artifacts:config=config/crd/volcano/bases
# volcano crd v1beta1
$(CONTROLLER_GEN) "crd:crdVersions=v1beta1" paths="./vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1;./vendor/volcano.sh/apis/pkg/apis/batch/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/bus/v1alpha1;./vendor/volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" output:crd:artifacts:config=config/crd/volcano/v1beta1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why those code is removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After updating the controller-gen tool to version 0.14.0 (which is compatible with Kubernetes 1.29), generating v1beta1 CRDs is no longer supported. While existing v1beta1 CRDs can still be used, they will not receive further updates.

@guoqinwill guoqinwill force-pushed the updatek8s_todo branch 3 times, most recently from 37945fe to 06899e5 Compare April 15, 2024 08:58
## TODO things for upgrade

#### Upgrade volcano apis
First,we need to upgrade the k8s version of volcano apis, such as:https://github.com/volcano-sh/apis/pull/124.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here should list what we need to do when update apis repo.
And also add to add that go version in go mod file and go build version of dockerfile should keep consistent with k8s.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

tail -n +3 ${VOLCANO_CRD_DIR}/v1beta1/scheduling.volcano.sh_podgroups.yaml > ${HELM_VOLCANO_CRD_DIR}/v1beta1/scheduling.volcano.sh_podgroups.yaml
tail -n +3 ${VOLCANO_CRD_DIR}/v1beta1/scheduling.volcano.sh_queues.yaml > ${HELM_VOLCANO_CRD_DIR}/v1beta1/scheduling.volcano.sh_queues.yaml
tail -n +3 ${VOLCANO_CRD_DIR}/v1beta1/nodeinfo.volcano.sh_numatopologies.yaml > ${HELM_VOLCANO_CRD_DIR}/v1beta1/nodeinfo.volcano.sh_numatopologies.yaml
tail -n +2 ${VOLCANO_CRD_DIR}/bases/batch.volcano.sh_jobs.yaml > ${HELM_VOLCANO_CRD_DIR}/bases/batch.volcano.sh_jobs.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The YAML generated by controller-gen v0.14.0 only has empty lines in the first two lines. Removing the first two lines should be sufficient. In previous versions, it was necessary to remove the first three empty lines.

@guoqinwill guoqinwill force-pushed the updatek8s_todo branch 2 times, most recently from 301635a to 48d6dce Compare April 30, 2024 06:57
@guoqinwill guoqinwill changed the title upgrade kind version of e2e and add the document of things to do when volcano adapts to k8s version upgrade Upgrade the version of kind and controller-gen to adapt k8s version upgrade May 10, 2024
@@ -31,7 +31,7 @@ jobs:

- name: Install dependences
run: |
GO111MODULE="on" go install sigs.k8s.io/kind@v0.15.0
GO111MODULE="on" go install sigs.k8s.io/kind@v0.21.0
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.23.0/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also upupgrade kubectl to v1.29.0?
refer to: #3460 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes,I will upgrade it.

@guoqinwill guoqinwill force-pushed the updatek8s_todo branch 3 times, most recently from f600a0b to 5604b7b Compare May 11, 2024 09:42
@Monokaix
Copy link
Member

Plz make ci happy.

Signed-off-by: guoqinwill <guoqinwill@163.com>
@guoqinwill guoqinwill force-pushed the updatek8s_todo branch 2 times, most recently from 398461f to d2c64ba Compare May 13, 2024 07:02
Signed-off-by: guoqinwill <guoqinwill@163.com>
Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label May 14, 2024
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2024
@volcano-sh-bot volcano-sh-bot merged commit 7b657f7 into volcano-sh:master May 14, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants