-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Description
Checklist:
- [+] I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
- [+] I've included steps to reproduce the bug.
- [+] I've pasted the output of
argocd version.
I'm using ArgoCD v2.6.1. I know it's no longer supported, but my company uses an older version of Kubernetes. Our developers use ArgoRollout to deploy their applications and periodically create issues for us by forgetting about their applications or images. I want to set up ignoring the number of replicas if a specific annotation with a certain value is added to the .metadata.annotations field:
ignoreDifferences:
- group: "*"
kind: "*"
jqPathExpressions:
- .metadata?.annotations?["custom.argocd.argoproj.io/ignore-spec-replicas"] as $ignoreSpec | if $ignoreSpec == "true" then .spec.replicas else null endThis works with Deployment or StatefulSet entities, but not with Rollout. In the Live Manifest tab, I see that the .spec.replicas field is simply deleted. If I set the annotation value to "false", the field reappears.
If I simply specify .spec.replicas in jqPathExpressions, it works for Rollout.
If I do it like this:
ignoreDifferences:
- group: "*"
kind: "*"
jqPathExpressions:
- if .kind == "Rollout" then .spec.replicas else null endthis also works and ArgoCD correctly ignores the field I need. But as soon as I add a longer path to the IF statement, everything breaks.
Can you accurately tell me in which version of ArgoCD this bug was fixed? Has anyone else encountered something similar and how can it be fixed?
