-
Notifications
You must be signed in to change notification settings - Fork 912
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 replaces spec/template/spec/containers #538
Comments
The issue is that kustomize does not support strategic merge patching of custom resources, so the patch you have defined, is actually replacing the entire list of containers. See https://github.com/jessesuen/kustomize-examples/tree/master/strategic-merge-patch-crd-fail for details. |
Closing since this is a kustomize limitation. When we reached out to kustomize maintainers about feature parity of native types for CRDs, we were told to follow kubernetes-sigs/kustomize#2339. |
since kubernetes-sigs/kustomize#2339 still not merged, for others who might stumble upon this. i just used kustomization.yaml patches:
- path: patches/transform_to_rollout.json
target:
group: apps
version: v1
kind: Deployment
name: frontend
transform_to_rollout.json [
{
"op": "replace",
"path": "/spec/strategy",
"value": {
"blueGreen": {
"autoPromotionEnabled": true,
"activeService": "frontend"
}
}
},
{
"op": "replace",
"path": "/kind",
"value": "Rollout"
},
{
"op": "replace",
"path": "/apiVersion",
"value": "argoproj.io/v1alpha1"
}
] if you'd used "commonLables" you also might need to change/add some of them. |
@hjanuschka Unfortunately, this removes configMapGenerator's hash because the kind is changed |
Deployment keeps
image: alpine
but Rollout doesn't even if I use transformer described in https://argoproj.github.io/argo-rollouts/features/kustomize/.Is this intentional?
https://github.com/mtsmfm/argo-rollout-with-kustomize-issue
The text was updated successfully, but these errors were encountered: