Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-3233

Expose labels in Argo CD Application events

XMLWordPrintable

    • Labels in Application Events
    • False
    • None
    • False
    • To Do
    • 0% To Do, 0% In Progress, 100% Done
    • Hide
      With this update, users can now expose Argo CD Application labels on Kubernetes events generated by Argo CD. When events are created for Applications with specific label keys defined in `resource.includeEventLabelKeys` field in `argocd-cm` configmap, the controller will attach the matching labels to these events. This enhancement simplifies filtering and processing events based on application labels.

      To configure `resource.includeEventLabelKeys` field in GitOps use `.spec.extraConfig` field of the `ArgoCD` CR. The operator automatically adds these fields from `extraConfig` to `argocd-cm` configmap.
      Example
      ```yaml
      apiVersion: argoproj.io/v1beta1
      kind: ArgoCD
      metadata:
        name: argocd-sample
        namespace: default
      spec:
        extraConfig:
          resource.includeEventLabelKeys: team,env*
      ```
      For more information, refer to the [upstream documentation](https://argo-cd.readthedocs.io/en/latest/operator-manual/declarative-setup/#labels-on-application-events).
      Show
      With this update, users can now expose Argo CD Application labels on Kubernetes events generated by Argo CD. When events are created for Applications with specific label keys defined in `resource.includeEventLabelKeys` field in `argocd-cm` configmap, the controller will attach the matching labels to these events. This enhancement simplifies filtering and processing events based on application labels. To configure `resource.includeEventLabelKeys` field in GitOps use `.spec.extraConfig` field of the `ArgoCD` CR. The operator automatically adds these fields from `extraConfig` to `argocd-cm` configmap. Example ```yaml apiVersion: argoproj.io/v1beta1 kind: ArgoCD metadata:   name: argocd-sample   namespace: default spec:   extraConfig:     resource.includeEventLabelKeys: team,env* ``` For more information, refer to the [upstream documentation]( https://argo-cd.readthedocs.io/en/latest/operator-manual/declarative-setup/#labels-on-application-events ).

      Epic Goal

      Add Application labels to Argo CD Application events so that they can be used in third party applications like those providing metrics dashboards or log analysis

      Why is this important?

      This request came to us from one of our existing customers as an RFE. As detailed below in Scenarios, the customer’s organisation is tagging their Applications via labels so that they’re able to differentiate between teams and environments further down the line in subsequent workflows. 

      This feature would contribute to improved observability of Argo CD, which is one of our priority areas in GitOps for CY 23. In addition to this, increasing the amount of customer driven backlog items is one of the goals the team identified at the start of the year.

      Scenarios

      From an upstream GitHub issue (created by a Red Hat customer):

      1. 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.

      Acceptance Criteria (Mandatory)

      • CI - MUST be running successfully with tests automated
      • Release Technical Enablement - provide an example and description of the feature, a summary of what use case it satisfies, and a link to the upstream docs
      • Documentation of this feature is added to the upstream
      • Release notes include this feature
      • Each Application event inherits the labels from the Application that generated it
      • Unit tests exist that cover the code that was changed or added as part of this feature

      Done Checklist

      • Acceptance criteria are met
      • Non-functional properties of the Feature have been validated (such as performance, resource, UX, security or privacy aspects)
      • User Journey automation is delivered
      • Support and SRE teams are provided with enough skills to support the feature in production environment

              rh-ee-sghadi Siddhesh Ghadi
              halawren@redhat.com Harriet Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: