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

Migrate away from using the generate-groups script from k8s.io #3659

Closed
roberthbailey opened this issue Feb 16, 2024 · 8 comments · Fixed by #3722
Closed

Migrate away from using the generate-groups script from k8s.io #3659

roberthbailey opened this issue Feb 16, 2024 · 8 comments · Fixed by #3722
Labels
help wanted We would love help on these issues. Please come help us! kind/feature New features for Agones

Comments

@roberthbailey
Copy link
Member

roberthbailey commented Feb 16, 2024

Is your feature request related to a problem? Please describe.

The generate-groups script was deprecated in Kubernetes 1.28 and will no longer exist with Kuberetes 1.30 (source). We need to update our tooling to no longer depend upon it.

Describe the solution you'd like
The replacement script is kube_codegen.sh. We should switch over to the new script.

Describe alternatives you've considered
We have to keep up with Kubernetes so there really isn't an alternative.

Additional context
https://github.com/googleforgames/agones/blob/main/build/build-image/gen-crd-client.sh#L19

@roberthbailey roberthbailey added kind/feature New features for Agones help wanted We would love help on these issues. Please come help us! labels Feb 16, 2024
@markmandel
Copy link
Member

Easiest way to check would be to run make shell and then look in /go/src/k8s.io/code-generator

@Kalaiselvi84
Copy link
Contributor

Regarding the generate-groups.sh script in the k8s.io/code-generator directory, I noticed that the kube_codegen.sh script is not present there. Will the kube_codegen.sh script be added to this directory automatically, or is there a different process for obtaining and using it?

:/go/src/agones.dev/agones# cd /go/src/k8s.io/code-generator/
:/go/src/k8s.io/code-generator# ls
CONTRIBUTING.md  OWNERS     SECURITY_CONTACTS  code-of-conduct.md  examples            generate-internal-groups.sh  go.sum  pkg          tools.go
LICENSE          README.md  cmd                doc.go              generate-groups.sh  go.mod                       hack    third_party

@Kalaiselvi84
Copy link
Contributor

Kalaiselvi84 commented Mar 1, 2024

The script kube_codegen.sh can be found in the code-generator repo at this link: https://github.com/kubernetes/code-generator/blob/master/kube_codegen.sh

Once kube_codegen.sh is available in the make shell; cd /go/src/k8s.io/code-generator/ directory, do we need to utilize it here - https://github.com/googleforgames/agones/blob/main/build/build-image/gen-crd-client.sh#L19?

@roberthbailey
Copy link
Member Author

We can either vendor the code-generator repo (at the same branch version as we vendor client-go), or we can clone that github repository inside of our build image and execute it there.

@Kalaiselvi84
Copy link
Contributor

Thanks @roberthbailey👍🏻

Just for my notes: We have cloned the code-generator repo in here. When Agones updates to Kubernetes 1.30, we will switch from generate-groups.sh to kube-codegen.sh.

@markmandel
Copy link
Member

When Agones updates to Kubernetes 1.30, we will switch from generate-groups.sh to kube-codegen.sh.

Just out of curiosity - I'm assuming the script doesn't exist in 1.29 ?

@Kalaiselvi84
Copy link
Contributor

Just out of curiosity - I'm assuming the script doesn't exist in 1.29 ?

I assumed that generate-groups.sh would be available until Kubernetes 1.30, However, I have verified that the new script is already present in Kubernetes version 1.28.6

root@deeaacff63a6:/go/src/k8s.io/code-generator# ls
CONTRIBUTING.md README.md code-of-conduct.md generate-groups.sh go.sum third_party
LICENSE SECURITY_CONTACTS doc.go generate-internal-groups.sh kube_codegen.sh tools.go
OWNERS cmd examples go.mod pkg

should I switch to the new script once the PR for the Kubernetes version is merged, or should I make the change within that PR?

@markmandel
Copy link
Member

should I switch to the new script once the PR for the Kubernetes version is merged, or should I make the change within that PR?

Let's do it in a new PR once that is merged. One problem at a time 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We would love help on these issues. Please come help us! kind/feature New features for Agones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants