Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-2170

Display the pod name as part of the health endpoints for Quarkus services

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • 2024-03-06 - API
    • None
    • None

      The health checks are exposed via turnpike routes. For example: https://internal.console.redhat.com/app/rhsm-metrics/internal/q/health. The problem is that a service might have several pods and we don't know what pod we're hitting.

      This task is about to print the pod name as part of the health check points.
      When the service is up and running in Kubernetes/OpenShift, the pod name is the metadata name.

      For example, the splunk binds the metadata.name to SPLUNKMETA_host by doing:

      - name: SPLUNKMETA_host
                valueFrom:
                  fieldRef:
                    apiVersion: v1
                    fieldPath: metadata.name
      

      Therefore, to get the pod name, we could inject either the same env var "SPLUNKMETA_host" as splunk, or bind another env var only for doing this or investigate if this is already exposed as part of another system property (I bet it's already an existing one).

      Acceptance Criteria

      • When calling the health endpoint in a Quarkus application: /q/health, we should get the pod name where the service is running.

            jcarvaja@redhat.com Jose Carvajal Hilario
            jcarvaja@redhat.com Jose Carvajal Hilario
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: