diff --git a/charts/promtail/templates/service-metrics.yaml b/charts/promtail/templates/service-metrics.yaml index 89602d6c44..631d906910 100644 --- a/charts/promtail/templates/service-metrics.yaml +++ b/charts/promtail/templates/service-metrics.yaml @@ -6,9 +6,13 @@ metadata: namespace: {{ include "promtail.namespaceName" . }} labels: {{- include "promtail.labels" . | nindent 4 }} - {{- toYaml .Values.service.labels | nindent 4 }} + {{- with .Values.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.service.annotations }} annotations: - {{- toYaml .Values.service.annotations | nindent 4 }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: clusterIP: None ports: