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 argocd diff app CLI return a difference, if the resource tracking is annotation+label and installationID is set, the diff will include a diff on all resource showing a removal of the instanceID annotation.
To Reproduce
$ kind create cluster
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.32.2) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/quick-start/
$ helm upgrade --install argocd argo/argo-cd -n argocd --create-namespace --set configs.cm.application\\.resourceTrackingMethod=annotation+label --set configs.cm.installationID=local-argocd
$ Release "argocd" does not exist. Installing it now.
NAME: argocd
LAST DEPLOYED: Wed Mar 19 08:34:50 2025
NAMESPACE: argocd
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
In order to access the server UI you have the following options:
1. kubectl port-forward service/argocd-server -n argocd 8080:443
and then open the browser on http://localhost:8080 and accept the certificate
2. enable ingress in the values file `server.ingress.enabled` and either
- Add the annotation for ssl passthrough: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-1-ssl-passthrough
- Set the `configs.params."server.insecure"` in the values file and terminate SSL at your ingress: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-2-multiple-ingress-objects-and-hosts
After reaching the UI the first time you can login with username: admin and the random password generated during the installation. You can find the password by running:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
(You should delete the initial secret afterwards as suggested by the Getting Started Guide: https://argo-cd.readthedocs.io/en/stable/getting_started/#4-login-using-the-cli)
$ kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d | pbcopy
$ kubectl port-forward service/argocd-server -n argocd 8080:443 Forwarding from 127.0.0.1:8080 -> 8080
Forwarding from [::1]:8080 -> 8080
Handling connection for 8080
...
$ argocd login localhost:8080
WARNING: server certificate had error: tls: failed to verify certificate: x509: certificate signed by unknown authority. Proceed insecurely (y/n)? y
Username: admin
Password:
'admin:login' logged in successfully
Context 'localhost:8080' updated
$ kubectl apply -f - <<EOF
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
destination:
server: https://kubernetes.default.svc
namespace: guestbook
syncPolicy:
syncOptions:
- CreateNamespace=true
EOF
$ argocd app sync guestbook
TIMESTAMP GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
2025-03-19T08:38:44-07:00 Service guestbook guestbook-ui OutOfSync Missing
2025-03-19T08:38:44-07:00 apps Deployment guestbook guestbook-ui OutOfSync Missing
2025-03-19T08:38:46-07:00 Namespace guestbook Running Synced namespace/guestbook created
2025-03-19T08:38:46-07:00 Service guestbook guestbook-ui Synced Healthy
2025-03-19T08:38:46-07:00 Service guestbook guestbook-ui Synced Healthy service/guestbook-ui created
2025-03-19T08:38:46-07:00 apps Deployment guestbook guestbook-ui OutOfSync Missing deployment.apps/guestbook-ui created
2025-03-19T08:38:46-07:00 apps Deployment guestbook guestbook-ui Synced Progressing deployment.apps/guestbook-ui created
Name: argocd/guestbook
Project: default
Server: https://kubernetes.default.svc
Namespace: guestbook
URL: https://argocd.example.com/applications/guestbook
Source:
- Repo: https://github.com/argoproj/argocd-example-apps.git
Target: HEAD
Path: guestbook
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: Synced to HEAD (4773b9f)
Health Status: Progressing
Operation: Sync
Sync Revision: 4773b9f1f8fd425f84174c338012771c4e9a989c
Phase: Succeeded
Start: 2025-03-19 08:38:44 -0700 PDT
Finished: 2025-03-19 08:38:46 -0700 PDT
Duration: 2s
Message: successfully synced (all tasks run)
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Namespace guestbook Running Synced namespace/guestbook created
Service guestbook guestbook-ui Synced Healthy service/guestbook-ui created
apps Deployment guestbook guestbook-ui Synced Progressing deployment.apps/guestbook-ui created
$ argocd app diff guestbook --revision fd70f16a43d8f14626329a4f687bc8f8f689e9f6
===== /Service guestbook/guestbook-ui ======
--- /var/folders/qx/7sdk5qzj5vbg49s4vp71_pyh0000gp/T/argocd-diff1349009795/guestbook-ui-live.yaml 2025-03-19 08:39:04
+++ /var/folders/qx/7sdk5qzj5vbg49s4vp71_pyh0000gp/T/argocd-diff1349009795/guestbook-ui 2025-03-19 08:39:04
@@ -2,7 +2,6 @@
kind: Service
metadata:
annotations:
- argocd.argoproj.io/installation-id: local-argocd
argocd.argoproj.io/tracking-id: guestbook:/Service:guestbook/guestbook-ui
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"argocd.argoproj.io/installation-id":"local-argocd","argocd.argoproj.io/tracking-id":"guestbook:/Service:guestbook/guestbook-ui"},"labels":{"argocd.argoproj.io/instance":"guestbook"},"name":"guestbook-ui","namespace":"guestbook"},"spec":{"ports":[{"port":80,"targetPort":80}],"selector":{"app":"guestbook-ui"}}}
===== apps/Deployment guestbook/guestbook-ui ======
--- /var/folders/qx/7sdk5qzj5vbg49s4vp71_pyh0000gp/T/argocd-diff2998763614/guestbook-ui-live.yaml 2025-03-19 08:39:04
+++ /var/folders/qx/7sdk5qzj5vbg49s4vp71_pyh0000gp/T/argocd-diff2998763614/guestbook-ui 2025-03-19 08:39:04
@@ -1,8 +1,7 @@
-apiVersion: apps/v1
+apiVersion: apps/v1beta2
kind: Deployment
metadata:
annotations:
- argocd.argoproj.io/installation-id: local-argocd
argocd.argoproj.io/tracking-id: guestbook:apps/Deployment:guestbook/guestbook-ui
deployment.kubernetes.io/revision: "1"
kubectl.kubernetes.io/last-applied-configuration: |
Checklist:
argocd version
.Describe the bug
When
argocd diff app
CLI return a difference, if the resource tracking is annotation+label and installationID is set, the diff will include a diff on all resource showing a removal of the instanceID annotation.To Reproduce
Expected behavior
Here is the diff I would have expected:
Screenshots
See
Expected behavior
Version
Logs
N/A
The text was updated successfully, but these errors were encountered: