Skip to content

Problem with serviceMonitor.yaml template #158

@nishant-corevas

Description

@nishant-corevas

ServiceMonitor Template missing labels

This template does not include labels from service monitor while creating serviceMonitor via helm values.

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: {{ include "livekit-server.serviceMonitorName" . }}
  labels:
    {{- include "livekit-server.labels" . | nindent 4 }}
  {{- with .Values.serviceMonitor.annotations }}
  annotations:
# helm-values.yaml
serviceMonitor:
  create: true
  interval: 15s
  labels:
    release: prometheus

The template only takes labels from root "livekit-server" but this line is missing and it does not expose metrics to prometheus operator.
{{- with .Values.serviceMonitor.labels }}

Please check and update the template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions