Skip to content

Commit

Permalink
feat: add additionalLabels to Service Monitor (#366)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
bradmccoydev committed May 2, 2023
1 parent 4f6e833 commit a89a5cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions charts/k8sgpt/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "k8sgpt.labels" . | nindent 4 }}
{{- if .Values.serviceMonitor.additionalLabels }}
{{- toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
spec:
endpoints:
- honorLabels: true
Expand Down
3 changes: 2 additions & 1 deletion charts/k8sgpt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ service:
annotations: {}

serviceMonitor:
enabled: false
enabled: false
additionalLabels: {}

0 comments on commit a89a5cf

Please sign in to comment.