-
Story
-
Resolution: Done
-
Normal
-
None
-
None
-
None
-
8
-
False
-
None
-
False
-
-
-
8
-
GitOps Crimson - Sprint 3257
Story (Required)
As an admin of Argo CD, I would like to define a allowlist of labels to added onto the k8s events generated by Argo CD to group them later for logging and monitoring purposes.
Background (Required)
Argo CD logs a bunch of k8s events for Argo CD resources/operations creation, updation, deletion etc. These events are particularly helpful in understanding cluster state and changes made to it. However, differentiating between these events is a challenging task without having a proper way to filter them easily. Adding labels on the events could help in grouping them better for analyses by admin or third-party logging/monitoring solutions.
Approach (Required)
The labels allowlist could be defined by 2 means i.e adding "--event-labels" cli flags for app-controllers & argocd-server or by introduce a new key “resource.eventLabelKeys'' in argocd-cm configmap. Configmap approach makes more sense to me as we could eliminate the need of updating flag configurations in 2 places i.e app-controller and argocd-server.
For any events generated for Applications containing the specified labels, the controller should add the matched label onto the event thus establishing an easy link between the event and the application to filter out using labels.
The specified labels should be matched against the Application and AppProject labels to add them onto the event. In case of conflict between labels on Application and AppProject, the Application label values should be prioritized and added to the event.
Eg: Application has a label “team: foo” and AppProject has “team: foo-bar”, in this case the event should have a label with Application value i.e “team: foo”.
Acceptance Criteria (Mandatory)
- Upstream proposal merged https://github.com/argoproj/argo-cd/issues/11381
- Implementation of the proposal merged
- End to end tests added
- Doc updated
- Built and tested in the downstream/product build
Test
- Deploy Argo CD
- Configure specific event labels using “resource.eventLabelKeys” in argocd-cm configmap
- Create a Argo CD Application with specific labels
- Use kubectl label selector to list all events with specific label
INVEST Checklist
Dependencies identified
Blockers noted and expected delivery timelines set
Design is implementable
Acceptance criteria agreed upon
Story estimated
Legend
Unknown
Verified
Unsatisfied
Done Checklist
- Code is completed, reviewed, documented and checked in
- Unit and integration test automation have been delivered and running cleanly in continuous integration/staging/canary environment
- Continuous Delivery pipeline(s) is able to proceed with new code included
- Customer facing documentation, API docs etc. are produced/updated, reviewed and published
- Acceptance criteria are met
- split from
-
GITOPS-4520 Refine and create required stories for labels in events
- Closed
- links to
-
RHEA-2024:137049 Errata Advisory for OpenShift GitOps v1.14.0