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

Kustomize version 5.3.0 causes unpredictable patches with null values #1198

Closed
frits-v opened this issue Apr 26, 2024 · 2 comments
Closed

Kustomize version 5.3.0 causes unpredictable patches with null values #1198

frits-v opened this issue Apr 26, 2024 · 2 comments
Assignees

Comments

@frits-v
Copy link

frits-v commented Apr 26, 2024

A bug (kubernetes-sigs/kustomize#5031) in the currently included kustomize version (5.3.0) causes patched manifests with null values have their values replaced by strings "null". This makes it hard to for example change a DeploymentStrategy from RollingUpdate to Recreate. The bug is fixed upstream (kubernetes-sigs/kustomize#5519), it is included in Kustomize 5.4.1.

Working example patch with kubectl:

kubectl patch deployments/example-deployment -p '{"spec":{"strategy":{"type":"Recreate","rollingUpdate":null}}}' --dry-run=server
deployment.apps/example-deployment patched

It's not possible to achieve the same results using the current nomos / config-sync versions, it will result in the following error:

[3] KNV1067: failed to encode declared fields: .spec.strategy.rollingUpdate: expected map, got &{null}

If you run nomos with --no-api-server-check it is clear why, the manifest excerpt in question:

[...]
  strategy:
    rollingUpdate: "null"

Please consider bumping the included Kustomize version to the latest stable.

@mikebz
Copy link
Contributor

mikebz commented Apr 26, 2024

Thank you! We will keep this in mind and will try to update to the latest version when it's time to release the next minor version of Config Sync (currently end of summer).

@mikebz mikebz self-assigned this Apr 26, 2024
@frits-v
Copy link
Author

frits-v commented Aug 6, 2024

This has been resolved with the latest release https://cloud.google.com/anthos-config-management/docs/release-notes#July_25_2024

@frits-v frits-v closed this as completed Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants