-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Render application label through kustomize instead of replacing after #2466
Comments
Hi - can you please provide repro steps? |
Labels from a service:
Selector from a servicemonitor:
So the instance label inside the kustomization was set to test-stage, but the application name was chosen to be stage-test. Actually the structure used here is weird on many levels, but one of our devs actually tried to build like this and was confused as to why his manifest isn't working inside kubernetes. Trying to make this less confusing, i'd say that the instance label argocd is replacing should be injected into the kustomization as a commonLabel instead of replacing it after kustomize was rendered. Or maybe to do both, what if a crd path is not configured for create in respect to commonLabels? |
Thank you Karl. Argo CD uses a label, by default You can change the label used from it's default value by following these instructions: https://argoproj.github.io/argo-cd/faq/#why-is-my-app-out-of-sync-even-after-syncing Alex See also #1482. |
Hello,
by default when argocd is used with kustomize, it sets the instance label as the application name.
The problem here is that is does this after the kustomization was rendered.
e.g
argo-cd/reposerver/repository/repository.go
Line 332 in 16e645b
This potentially causing errors when users are utilizing variables inside kustomize where they are doing operations on that label or with the value of that label.
This could be avoided by rendering the application label with kustomize in the first place.
All operations would stay valid
at the time this can be avoided by using the commonLabel feature introduced here:
b645589
Yet, i think, i would be more favorable to do it right in the first place
The text was updated successfully, but these errors were encountered: