-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Patching a string with a number "converts" the number into a string #3424
Comments
I forgot to mention that, probably, it was working as expected in the version We use As it can be seen from https://github.com/fluxcd/flux/pull/3309/files, they went from kustomize |
Thanks for the report. Likely the same underlying problem as #3412 |
Close this. Please use #3412 for string quotes issue in 3.9.x. |
Turns out these aren't the same issues. |
Closed by #3438 |
Describe the bug
I want to apply a patch by using
patches
to a field which value is a string. The patch is meant to change the value to be an integer.The patch succeeds, but the final value is not an integer, it is a string with the value of the integer.
kustomization.yaml
pdb-patch.yaml
my_file.yaml
Expected output
Actual output
Kustomize version
The problem is present in
and also in
Platform
Linux
Additional context
Usually this is not a problem, probably, but it is a big issue with the PodDisruptionBudget which values must be integers or strings with the percentage (%).
I can't use the
patchesStrategicMerge
because I want to apply the same patch to multiple resources. You have to imagine that themy_file.yaml
contains manyPodDistruptionBudget
.I am open to any suggestions to achieve the same result in a different way.
The text was updated successfully, but these errors were encountered: