-
Notifications
You must be signed in to change notification settings - Fork 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
Exposing Application labels in events #11381
Comments
I would like to extend this proposal. Sometimes using Application labels may not be enough, because important labels are on the AppProject only (our another case). So I propose to allow to expose particular labels from AppProject as well. And it would be great to enable this for prometheus metrics as well. |
I think this would be useful. However, I have a slight concern about using both, labels from If both, |
I have several ideas:
I prefer second variant ("prioritize Application before AppProject") - almost the same as you said. But I'm not sure if you count with argument for selecting labels for propagating to events. I count with it, because propagating labels to metrics is based on it. There is also possibility to have only one argument for all combination Application/AppProject, metrics/events (and not different for metrics and events as I stated above). It doesn't matter in our case. |
As long as this behaviour is documented, I'd be fine with labels on the Application to override labels from the AppProject on the emitted events. |
I was wondering though, what ends up on the events should be annotations, not labels, right? |
We count with labels. |
I am working on implementing this feature and was thinking, would it make sense to have all the app & proj labels added by default without making it configurable. We already have lot of configurable params in Argo CD and making this configurable will introduce 2 more flags in app-controller and argocd-server. |
Hi @mrysavy , @jannfis, I have a PR (#18160) up to implement this enhancement. I have introduced a new key in argocd-cm instead of cli flags. Configmap approach made more sense to me as we could eliminate the need of updating flag configurations in 2 places i.e app-controller and argocd-server. PTAL. Thanks. |
Hi @svghadi, I've tried the patch and it looks good. Thanks for the implementation |
Summary
I would like to have Application labels also in argo-cd events, the same way as it is possible to have them in Prometheus metrics (see https://argo-cd.readthedocs.io/en/stable/operator-manual/metrics/#exposing-application-labels-as-prometheus-metrics)
Motivation
Our use-case is almost the same as the one stated in the documentation for
Exposing Application labels as Prometheus metrics
.We have several Application labels which differentiate team (business application) and environment (dev/test/prod) and we would like to forward ArgoCD Application events (as well as container stdout) to central ELK, particular index.
Unfortunately we don't have strict naming convention for Kubernetes namespaces or ArgoCD application which we could use for the corrent messages distribution.
Proposal
The implementation should be similar to the implementation for Prometheus metrics - specify application labels for events and use them in
event.metadata.anotations
(likedest-namespace
anddest-server
here and here).Finaly I would like to ask if there is some workaround that can we use now.
Thanks
The text was updated successfully, but these errors were encountered: