feat: add additionalLabels to Service Monitor (#366)

* feat: add additionalLabels to Service Monitor

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

* feat: update additionalLabels

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

---------

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>
This commit is contained in:
Brad McCoy
2023-05-02 17:58:39 +10:00
committed by GitHub
parent 4f6e833d34
commit a89a5cfa2e
2 changed files with 5 additions and 1 deletions

View File

@@ -6,6 +6,9 @@ metadata:
namespace: {{ .Release.Namespace | quote }} namespace: {{ .Release.Namespace | quote }}
labels: labels:
{{- include "k8sgpt.labels" . | nindent 4 }} {{- include "k8sgpt.labels" . | nindent 4 }}
{{- if .Values.serviceMonitor.additionalLabels }}
{{- toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
spec: spec:
endpoints: endpoints:
- honorLabels: true - honorLabels: true

View File

@@ -24,3 +24,4 @@ service:
serviceMonitor: serviceMonitor:
enabled: false enabled: false
additionalLabels: {}