Skip to content

[Feature] Standardize Kubernetes Labels for Metrics and Dashboards #120

Description

@NotYuSheng

Description

Apply a consistent set of Kubernetes labels across all OmniPDF service Deployments and Services (via Helm templates) to ensure compatibility with Prometheus ServiceMonitor selectors and Grafana dashboard grouping.


User Story

As a DevOps maintainer, I want to standardize service and deployment labels across all charts so that metrics and dashboards can reliably reference and group services without special handling per microservice.


Acceptance Criteria

  1. Given a Helm chart for a microservice, when it is deployed, then its Deployment, Service, and Pod objects should all contain a consistent set of observability-related labels.
  2. If a ServiceMonitor or Grafana dashboard relies on these labels (e.g., app, component), then they must remain stable and predictable across environments.

Notes

  • Recommended label set:

    labels:
      app.kubernetes.io/name: {{ include "your-service.name" . }}
      app.kubernetes.io/instance: {{ .Release.Name }}
      app.kubernetes.io/version: {{ .Chart.AppVersion }}
      app.kubernetes.io/component: backend
      app.kubernetes.io/part-of: omnipdf
      app.kubernetes.io/managed-by: Helm
  • These labels:

    • Are compatible with Prometheus matchLabels
    • Enable kubectl/oc filtering and resource grouping
    • Improve clarity in Grafana dashboards and OpenShift Console
  • Update all existing Helm charts to include this label block in:

    • templates/deployment.yaml
    • templates/service.yaml
    • Any custom resources like ServiceMonitor
  • Bonus: This also improves compatibility with tools like Argo CD, Kustomize, and GitOps workflows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew user-facing functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions