You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an Application or ApplicationSet is using the syncPolicy.managedNamespaceMetadata field with the RespectIgnoreDifferences=true flag is set and the resource.customizations.ignoreDifferences.apps_Deployment (and StatefulSet) is set in the argocd-cm ConfigMap, Argo CD will incorrectly calculate the differences in the .spec.template.metadata.annotations field. It will show that the live manifest has
template:
metadata:
annotations: {}
instead of not being set at all when the only annotation set is the one being ignored in the resource.customizations.ignoreDifferences settings.
Once the Deployment exists, do a kubectl rollout restart deploy/guestbook-helm-guestbook -n guestbook to add the kubectl.kubernetes.io/restartedAt annotation.
Verify that the Application in Argo CD shows no differences.
Edit the Application to set a label on the Namespace using the syncPolicy.managedNamespaceMetadata field and apply it
The Application will show that there is a difference because the Namespace label has not been applied.
Click sync to sync the Application and have the Namespace label applied.
After this, the Application will always show that there is a difference in the guestbook-helm-guestbook Deployment's annotations.
Expected behavior
The Application should not show that there are any differences in the Application.
Screenshots
Version
v2.12.6+4dab5bd
I also tested this with the latest v2.13.0-rc5 release as well and was able to reproduce it.
Tested reproduction steps with Kubernetes Server Version: v1.29.4 and Server Version: v1.31.1 using kind.
The text was updated successfully, but these errors were encountered:
Checklist:
argocd version
.Describe the bug
When an Application or ApplicationSet is using the
syncPolicy.managedNamespaceMetadata
field with theRespectIgnoreDifferences=true
flag is set and theresource.customizations.ignoreDifferences.apps_Deployment
(and StatefulSet) is set in theargocd-cm
ConfigMap, Argo CD will incorrectly calculate the differences in the.spec.template.metadata.annotations
field. It will show that the live manifest hasinstead of not being set at all when the only annotation set is the one being ignored in the
resource.customizations.ignoreDifferences
settings.To Reproduce
Update the
argocd-cm
ConfigMap to containRestart Argo CD pods
Create an Application using the guestbook example app.
Apply the Application to the Argo CD instance.
Once the Deployment exists, do a
kubectl rollout restart deploy/guestbook-helm-guestbook -n guestbook
to add thekubectl.kubernetes.io/restartedAt
annotation.Verify that the Application in Argo CD shows no differences.
Edit the Application to set a label on the Namespace using the
syncPolicy.managedNamespaceMetadata
field and apply itThe Application will show that there is a difference because the Namespace label has not been applied.
Click sync to sync the Application and have the Namespace label applied.
After this, the Application will always show that there is a difference in the
guestbook-helm-guestbook
Deployment's annotations.Expected behavior
The Application should not show that there are any differences in the Application.
Screenshots
Version
I also tested this with the latest
v2.13.0-rc5
release as well and was able to reproduce it.Tested reproduction steps with Kubernetes
Server Version: v1.29.4
andServer Version: v1.31.1
using kind.The text was updated successfully, but these errors were encountered: