Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-1783

[janus-idp/backstage-showcase] Wrong label and container port in doc on Setting up Metrics Monitoring for Operator-backed deployments

XMLWordPrintable

    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • RHDH Core Team 3258

      [2348866935] Upstream Reporter: Armel Soro
      Upstream issue status: Open
      Upstream description:

      What do you want to improve?

      https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/monitoring-and-logging.md#operator-backed-deployment

      Stumbled upon this while reviewing https://github.com/redhat-developer/red-hat-developers-documentation-rhdh/pull/263

      What is the current documentation?

      # make sure to update CR_NAME value accordingly
      $ CR_NAME=my-rhdh
      $ MY_PROJECT=my-project
      $ cat <<EOF > /tmp/${CR_NAME}.ServiceMonitor.yaml
      apiVersion: monitoring.coreos.com/v1
      kind: ServiceMonitor
      metadata:
        name: ${CR_NAME}
        namespace: ${MY_PROJECT}
        labels:
          app.kubernetes.io/instance: ${CR_NAME}
          app.kubernetes.io/name: backstage
      spec:
        namespaceSelector:
          matchNames:
            - ${MY_PROJECT}
        selector:
          matchLabels:
            janus-idp.io/app: backstage-${CR_NAME}
        endpoints:
        - port: http-backend
          path: '/metrics'
      EOF
      $ oc apply -f /tmp/${CR_NAME}.ServiceMonitor.yaml

      In the ServiceMonitor resource to create, the label name added by the Operator has changed from janus-idp.io/app to rhdh.redhat.com/app a long time ago (https://github.com/janus-idp/operator/issues/199) before the first version of the operator was released, and we forgot to update this doc.

      Also, the container port endpoint to scrape metrics from seems to be wrong. It should be backend as per the 1.1.x, 1.2.x or main branches in the operator repo.

      As a consequence, the instructions depicted in this https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/monitoring-and-logging.md#operator-backed-deployment will not work as expected.

      What is the new documentation?

      • Replace janus-idp.io/app with rhdh.redhat.com/app
      • Replace the container port name from http-backend to backend
      • Make sure the instructions provided work correctly

      /good-first-issue


      Upstream URL: https://github.com/janus-idp/backstage-showcase/issues/1321

              rh-ee-fndlovu Fortune Ndlovu
              rh-ee-asoro Armel Soro
              RHIDP - Cope
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: