Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracking annotation in k8s resource cannot be updated after it is moved from one application to another application #17965

Open
3 tasks done
domechn opened this issue Apr 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@domechn
Copy link

domechn commented Apr 25, 2024

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.

Describe the bug

Currently we are using annotation+label to track argocd resources.

But When we moved k8s resources from A application to B application, we found that the tracking label can be updated successfully, but the tracking annotation cannot be updated.

Also we checked the argocd diff on argocd ui, it showed there was no difference between before and after.

image

image

image

To Reproduce

  1. use annotation+label as tracking method.
  2. create application A to create any k8s resource.
  3. remove k8s resources in application A in git, but not prune them in k8s.
  4. create application B to manage k8s resources which created in application A.

Expected behavior

argocd.argoproj.io/tracking-id annotation can be updated successfully

Screenshots

Version

Paste the output from `argocd version` here.
argocd: v2.9.2+c5ea5c4.dirty
  BuildDate: 2023-11-20T18:19:21Z
  GitCommit: c5ea5c4df52943a6fff6c0be181fde5358970304
  GitTreeState: dirty
  GoVersion: go1.21.4
  Compiler: gc
  Platform: darwin/arm64
WARN[0001] Failed to invoke grpc call. Use flag --grpc-web in grpc calls. To avoid this warning message, use flag --grpc-web.
argocd-server: v2.8.15+e94f6a8
  BuildDate: 2024-04-04T23:36:03Z
  GitCommit: e94f6a8f840714b55006cf8c8e7f3017b3a0d2ea
  GitTreeState: clean
  GoVersion: go1.20.10
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: (devel) unknown
  Helm Version: v3.10.3+g835b733
  Kubectl Version: v0.24.2
  Jsonnet Version: v0.20.0

Logs

Paste any relevant application logs here.
@domechn domechn added the bug Something isn't working label Apr 25, 2024
@domechn
Copy link
Author

domechn commented Apr 25, 2024

not sure whether it is caused by this function

https://github.com/argoproj/argo-cd/blob/release-2.8/util/argo/resource_tracking.go#L211

image

it seems when argocd does comparision, and it finds tracking method is not label, it will override tracking id annotation in live by using tracking annotation value in target, this behavior makes there is no difference between live tracking annotation value and target tracking annotation value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant