Replies: 2 comments 1 reply
-
Hello @jgutschon have you tried to ignore the It is working in my case, but I've checked a strange behaviour that for example the We have ArgoCD managing itself and in this case with autoscaling enabled the replicas differences are not "seen" by ArgoCD Tried to do the same on a custom deployment and it seems that a |
Beta Was this translation helpful? Give feedback.
-
We simply remove the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having some issues using
ignoreDifferences
on a few applications that are running Deployments with an HPA. I'm settingignoreDifferences
on the Application to ignore fields managed bykube-controller-manager
:and I've set the sync policy as:
My goal here is to ignore the
replicas
field on the deployment since it will be managed bykube-controller-manager
with the HPA enabled for the deployment. I'm aware of the recommendation to omit this field entirely if using an HPA, however I've chosen to set it as the HPA'sminReplicas
to prevent scaling down to one pod if the Deployment is recreated in some scenarios.This has worked fairly well in general, however, if the replicas field in the Deployment manifest is manually edited and applied in the ArgoCD UI, the
kube-controller-manager
managed field is overwritten andargocd-server
becomes the manager:After this change, the deployment becomes out of sync and shows a diff on the replicas field. Syncing again after this will then cause it to scale down to value in the manifest. After syncing, the replicas field becomes managed by
argocd-controller
. The HPA still functions normally and scales as needed but the deployment stays out of sync as the replicas value changes.The only way I've been able to restore the managedFields for kube-controller-manager at this point has been to orphan-delete the deployment and recreate it, but any future manual edits to the replicas field reproduce this behavior. Not exactly sure if this is intended behavior so I'm wondering if anyone knows a way around this issue.
Beta Was this translation helpful? Give feedback.
All reactions