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

Enhancement: use "patches" instead of "patchesStrategicMerge" #941

Open
jfavellar90 opened this issue Nov 16, 2023 · 4 comments
Open

Enhancement: use "patches" instead of "patchesStrategicMerge" #941

jfavellar90 opened this issue Nov 16, 2023 · 4 comments
Labels
bug Bugs will be investigated and fixed as quickly as possible. good first issue Good issue to tacke for first-time contributors

Comments

@jfavellar90
Copy link

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

It is not related to a problem, but a functionality limitation. PatchesStrategicMerge (used here ) is going to be deprecated in future releases of the Kustomization API and can be easily replaced by the patches key. It is more powerful and allows defining different patch types (including PatchesStrategicMerge). It works for the Kustomization API version currently used by Tutor, from Kubectl 1.24 and upwards (See the Kubectl-Kustomize version equivalence here ).

Describe the solution you'd like

The set of changes is pretty straightforward, please see this commit to take a closer look

@regisb regisb added bug Bugs will be investigated and fixed as quickly as possible. good first issue Good issue to tacke for first-time contributors labels Nov 23, 2023
@regisb
Copy link
Contributor

regisb commented Nov 23, 2023

Thanks for the bug description @jfavellar90. Transitioning from "patchesStrategicMerge" to "patches" is going to be a breaking change, so we should make that change in Quince.

@regisb
Copy link
Contributor

regisb commented Nov 24, 2023

Solved by #947. Thank you Jhony!

@regisb regisb closed this as completed Nov 24, 2023
@jfavellar90
Copy link
Author

jfavellar90 commented Nov 24, 2023

@regisb Unfortunately we'll need to revert #947. An issue in Kustomize prevents having multiple patches in the same file. For instance, in the pod-autoscaling plugin, there are multiple patches in the override.yml file separated by ---. This is not accepted by the new "patches" key, at least not before Kustomize 5.2.1 (the issue was already fixed here ). It would force to split the patches into different files, which is definitively not desirable. Given that the latest Kubectl version (1.28.4 at this date) is delivered with Kustomize 5.0.4, we'll need to delay this change until we get a version with the issued fixed.

@regisb
Copy link
Contributor

regisb commented Nov 24, 2023

Thanks for the detailed explanation @jfavellar90! I'll mark the issue as "blocked" until Kustomize 5.2.1 is the new default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs will be investigated and fixed as quickly as possible. good first issue Good issue to tacke for first-time contributors
Projects
Development

No branches or pull requests

2 participants