-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Optionally add app.kubernetes.io/managed-by
label to all resources
#14638
Comments
Just add a label to either the statefulset or a deployment to make it persistent.
For pods already running invoke a label against these by issue this:
|
Thanks. How do I put that into code so Argo does it for me? |
if it's a helm chart then amend this stanza occuring for every component: "# Pod Labels" Essentially for your deployment it would like this: "# Pod Labels"
|
So then I have to modify the manifest for every object I want to deploy. That's kind of the point of my feature request; it would be much nicer if Argo CD could do that work for me. :) |
To state the use case another way: |
Yes, exactly what I mean! |
What about |
Good question.
|
Good points, I realised that I'd say that this would be a good change in general. |
Important detail! I totally missed the differing labels too, only focusing on the |
Hi! I would like to take a swing at implementing this. Any pointers on where to start? |
Issue argoproj#14638 Signed-off-by: Jura Milić <[email protected]>
@jmilic1 this is where we add resource tracking annotations: argo-cd/reposerver/repository/repository.go Line 1393 in 9a0c3cf
Might be a reasonable place to add this new metadata. |
Hey guys! I prepared a PR at #14945 |
I think it's amazing that you put in the effort to create a PR! Let's make this happen. 🚀 |
Summary
I would like to automatically add the label
app.kubernetes.io/managed-by: argocd
to all resources deployed by Argo CD.Motivation
This would make it easier to manually track all instances of resources that are managed by Argo CD and separate them from the resources that are not managed by Argo CD. An example for this would be if I perform some change to Argo and check that all pods are still running (e.g.,
kubectl get pods -A -l app.kubernetes.io/managed-by=argocd
) or for other monitoring systems such as queries in Grafana Loki et al.The
app.kubernetes.io/managed-by
label is one of the recommended labels for Kubernetes, so that's also something that strengthens the case for setting this label, in my opinion.Proposal
I would like this to be an opt-in feature that lets users add this label. Ideally, it would be a general function that can add any label to all resources, or all resources in a certain project even!
This bears some resemblance to the current
spec.syncPolicy.managedNamespaceMetadata
option in theApplication
object.The text was updated successfully, but these errors were encountered: