Skip to content

Add support for strategic merge patch style #8628

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

Open
112358fn opened this issue Mar 7, 2025 · 0 comments
Open

Add support for strategic merge patch style #8628

112358fn opened this issue Mar 7, 2025 · 0 comments

Comments

@112358fn
Copy link

112358fn commented Mar 7, 2025

The work done in #8490 to add structural OpenAPI schema of Tekton CRDs, enables the support for strategic merge patch.

According to the kustomize documentation

Strategic merge patches may require additional configuration via openapi field to work as expected with custom resources.

From the sig-api-machinery:

Strategic Merge Patch uses the go struct tag of the API objects to determine what lists should be merged and which ones should not. The metadata is available as struct tags on the API objects themselves and also available to clients as OpenAPI annotations.

This means that by including the extensions x-kubernetes-patch-strategy and x-kubernetes-patch-merge-key on the OpenAPI schema of the relevant lists we can enable strategic merge patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant