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 switching tracking method from label to annotation (or vice versa) in a running Argo CD system, Argo CD will lose track of managed live resources, resulting in a situation where Argo CD will not pick up changes to live resources and also fails to prune them.
Observe that Argo CD has not picked up the change (i.e. Application is still in Synced state)
$ argocd app list
NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS REPO PATH TARGET
guestbook https://kubernetes.default.svc guestbook default Synced Healthy <none><none> https://github.com/argoproj/argocd-example-apps.git guestbook
Delete the app with cascade, and observe that resources will not get removed:
$ argocd app delete guestbook --cascade
Are you sure you want to delete 'guestbook' and all its resources? [y/n]
y
application 'guestbook' deleted
$ kubectl get -n guestbook all
NAME READY STATUS RESTARTS AGE
pod/guestbook-ui-6b689986f-dqgvm 1/1 Running 0 13m
pod/guestbook-ui-6b689986f-hsdlt 1/1 Running 0 2m32s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/guestbook-ui ClusterIP 10.43.104.8 <none> 80/TCP 13m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/guestbook-ui 2/2 2 2 13m
NAME DESIRED CURRENT READY AGE
replicaset.apps/guestbook-ui-6b689986f 2 2 2 13m
Expected behavior
Argo CD being able to switch resource tracking methods while running.
Screenshots
Version
Latest code in master branch as of 2022-06-24 13:00:00 CEST (commit 9d4c940)
Logs
Paste any relevant application logs here.
The text was updated successfully, but these errors were encountered:
Checklist:
argocd version
.Describe the bug
When switching tracking method from
label
toannotation
(or vice versa) in a running Argo CD system, Argo CD will lose track of managed live resources, resulting in a situation where Argo CD will not pick up changes to live resources and also fails to prune them.To Reproduce
Create the
guestbook
Application:$ argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-namespace guestbook --dest-server https://kubernetes.default.svc --sync-option CreateNamespace=true application 'guestbook' created
Sync application
Check that application is healthy and in sync
Change a managed live resource in the cluster and check that Argo CD is aware of it
Revert change by syncing the app
Change tracking method to annotation
$ kubectl patch configmaps argocd-cm --patch='{"data": {"application.resourceTrackingMethod": "annotation"}}' configmap/argocd-cm patched
Sync application to apply annotation to live resources and remove previous label
Check annotation has been applied, and label has been removed
Patch managed live resource again
$ kubectl patch -n guestbook deployments.apps guestbook-ui --patch='{"spec":{"replicas":4}}'
Observe that Argo CD has not picked up the change (i.e. Application is still in Synced state)
Delete the app with cascade, and observe that resources will not get removed:
Expected behavior
Argo CD being able to switch resource tracking methods while running.
Screenshots
Version
Latest code in
master
branch as of 2022-06-24 13:00:00 CEST (commit 9d4c940)Logs
The text was updated successfully, but these errors were encountered: