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

Enable Openshift monitoring stack to pick up gitops operator metrics

XMLWordPrintable

    • 5
    • False
    • None
    • False
    • SECFLOWOTL-87 - Operator to handle fleets of ArgoCD CRs
    • Hide
      With this update, the OpenShift GitOps operator exports a few custom metrics that allow users to track the performance of the operator. These metrics include:
      `active_argocd_instances_total` - The number of Argo CD instances currently being managed across the cluster
      `active_argocd_instances_by_phase{phase="some-phase"}` - The number of managed Argo CD instances in the given phase
      `active_argocd_instance_reconciliation_count{namespace="some-namespace"}` - The number of times the instance in a given namespace has been reconciled
      `controller_runtime_reconcile_time_seconds_per_instance{namespace="some-namespace}` - The distribution of reconciliation cycles by their durations for the instance in a given namespace
      Show
      With this update, the OpenShift GitOps operator exports a few custom metrics that allow users to track the performance of the operator. These metrics include: `active_argocd_instances_total` - The number of Argo CD instances currently being managed across the cluster `active_argocd_instances_by_phase{phase="some-phase"}` - The number of managed Argo CD instances in the given phase `active_argocd_instance_reconciliation_count{namespace="some-namespace"}` - The number of times the instance in a given namespace has been reconciled `controller_runtime_reconcile_time_seconds_per_instance{namespace="some-namespace}` - The distribution of reconciliation cycles by their durations for the instance in a given namespace
    • GITOPS Sprint 241, GITOPS Sprint 243, GITOPS Sprint 3244, GITOPS Sprint 3245

      Once Argo CD operator is emitting the necessary metrics out, GitOps operator needs to be able to consume those changes and also emit those same metrics out. Further, in order for openshift monitoring to pick up the metrics being emitted, the following things must be done:

      • Add kube-rbac-proxy container to the operator deployment
      • Add a metrics service annotated with `service.beta.openshift.io/serving-cert-secret-name` with some value, which will instruct ca-operator to generate a cert and inject it into a secret with the given name
      • Add a service monitor that can watch the created service, and specifies the bearertokenfile path and appropriate tlsConfig values for Prometheus
      • A role and rolebinding that allows the openshfit-monitoring stack prometheus serviceaccount to access pods, endpoints and services within the gitops operator namespace 
      • update all labels on gitops-operator manifests to `control-plane: gitops-operator`

      Acceptance criteria:
       

      • All the above detailed steps are carried out in a PR
      • GitOps metrics are displayed under observe > metrics in the admin console 

              jrao@redhat.com Jaideep Rao
              jrao@redhat.com Jaideep Rao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: