-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add PodMonitor configuration for Prometheus Operator (#32)
* feat: add PodMonitor configuration in Prometheus * bump up the version * fixed the chart version
- Loading branch information
1 parent
1372a39
commit 0de0aaf
Showing
5 changed files
with
129 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{{- define "helmet.podmonitor" -}} | ||
{{- if .Values.podMonitor.enabled }} | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: {{ include "common.names.fullname" . }} | ||
{{- if .Values.podMonitor.namespace }} | ||
namespace: {{ .Values.podMonitor.namespace | quote }} | ||
{{- else }} | ||
namespace: {{ include "common.names.namespace" . | quote }} | ||
{{- end }} | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
{{- if .Values.podMonitor.labels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.podMonitor.labels "context" $) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.podMonitor.jobLabel }} | ||
jobLabel: {{ .Values.podMonitor.jobLabel }} | ||
{{- end }} | ||
podMetricsEndpoints: | ||
- port: {{ .Values.podMonitor.port | quote }} | ||
path: {{ .Values.podMonitor.path | quote }} | ||
{{- if .Values.podMonitor.interval }} | ||
interval: {{ .Values.podMonitor.interval }} | ||
{{- end }} | ||
{{- if .Values.podMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ .Values.podMonitor.scrapeTimeout }} | ||
{{- end }} | ||
{{- if .Values.podMonitor.relabelings }} | ||
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.podMonitor.relabelings "context" $) | nindent 6 }} | ||
{{- end }} | ||
{{- if .Values.podMonitor.metricRelabelings }} | ||
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.podMonitor.metricRelabelings "context" $) | nindent 6 }} | ||
{{- end }} | ||
{{- if .Values.podMonitor.honorLabels }} | ||
honorLabels: {{ .Values.podMonitor.honorLabels }} | ||
{{- end }} | ||
namespaceSelector: | ||
{{- if .Values.podMonitor.namespaceSelector }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.podMonitor.namespaceSelector "context" $) | indent 4 }} | ||
{{- else }} | ||
matchNames: | ||
- {{ include "common.names.namespace" . | quote }} | ||
{{- end }} | ||
selector: | ||
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} | ||
{{- if .Values.podMonitor.selector }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.podMonitor.selector "context" $) | nindent 6 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters