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

Add OpenAPI x-kubernetes-patch keys for patching CRDs #3112

Open
clrxbl opened this issue Apr 19, 2023 · 8 comments
Open

Add OpenAPI x-kubernetes-patch keys for patching CRDs #3112

clrxbl opened this issue Apr 19, 2023 · 8 comments
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. awaiting-maintainer Block issues from being stale/obsolete/closed good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/feature New features for Agones

Comments

@clrxbl
Copy link

clrxbl commented Apr 19, 2023

Is your feature request related to a problem? Please describe.
I am using Kustomize to patch Agones Fleets. If I attempt to do this right now without a custom OpenAPI schema, it will simply replace what I'm attempting to patch instead of merging.

Describe the solution you'd like
Add x-kubernetes-patch keys to allow merging e.g. containers, initContainers and more.

Describe alternatives you've considered
I can get this working locally by exporting the OpenAPI schema and adding the keys myself.

Additional context
N/A

@clrxbl clrxbl added the kind/feature New features for Agones label Apr 19, 2023
@vytskalt
Copy link

I've been looking into this and looks like the keys are specifically being removed:

keysToRemove := []string{
"x-kubernetes-patch-strategy",
"x-kubernetes-patch-merge-key",
"x-kubernetes-list-type",
"x-kubernetes-group-version-kind",
"x-kubernetes-list-map-keys",
"x-kubernetes-unions",
}

Why is this the case?

@markmandel
Copy link
Collaborator

I'm going back through history (since this was done a while ago), but as far as I can tell, those properties are not supported on CRDs, so we strip them off sub-resources, such as PodTemplateSpec.

Happy to be proven wrong however!

Copy link

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

@github-actions github-actions bot added the stale Pending closure unless there is a strong objection. label May 15, 2024
@markmandel
Copy link
Collaborator

Just checking in to see if there is more we can do here, or if my comment above about non-support on CRDs makes this a non-starter?

@markmandel markmandel removed the stale Pending closure unless there is a strong objection. label May 23, 2024
@clrxbl
Copy link
Author

clrxbl commented May 23, 2024

Just checking in to see if there is more we can do here, or if my comment above about non-support on CRDs makes this a non-starter?

I've been using patch merge keys for the past year for the past year or so without any issues on GameServer CRDs with Kustomize. I just had to end up exporting CRDs, manually modifying it to add the keys and passing it along to Kustomize to make it work.

@markmandel
Copy link
Collaborator

Sounds like it's worth a review!

Happy to also accept PRs with the changes to our tools and accompanying exports.

@markmandel markmandel added help wanted We would love help on these issues. Please come help us! good first issue These are great first issues. If you are looking for a place to start, start here! area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. labels May 23, 2024
Copy link

github-actions bot commented Jul 1, 2024

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

@github-actions github-actions bot added the stale Pending closure unless there is a strong objection. label Jul 1, 2024
@markmandel markmandel added awaiting-maintainer Block issues from being stale/obsolete/closed and removed stale Pending closure unless there is a strong objection. labels Jul 2, 2024
@markmandel
Copy link
Collaborator

Moving to awaiting-maintainer since I do want to see this tackled at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. awaiting-maintainer Block issues from being stale/obsolete/closed good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/feature New features for Agones
Projects
None yet
Development

No branches or pull requests

3 participants