Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgrath207 committed Mar 31, 2024
1 parent ab9f046 commit a88f195
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
20 changes: 20 additions & 0 deletions chart/templates/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,32 @@ spec:
port: metrics
scheme: http
interval: "{{ .Values.interval }}s"
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ toYaml .Values.serviceMonitor.metricRelabelings | indent 4 }}
{{- end }}
{{- if .Values.serviceMonitor.relabelings }}
relabelings:
{{ toYaml .Values.serviceMonitor.relabelings | indent 4 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "chart.selectorLabels" . | nindent 6 }}
{{- if .Values.serviceMonitor.targetLabels }}
targetLabels:
{{- range .Values.serviceMonitor.targetLabels }}
- {{ . }}
{{- end }}
{{- end }}
{{- if .Values.serviceMonitor.podTargetLabels }}
podTargetLabels:
{{- range .Values.serviceMonitor.podTargetLabels }}
- {{ . }}
{{- end }}
{{- end }}

---

Expand Down
11 changes: 11 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ image:
tag: 1.6.2
imagePullPolicy: IfNotPresent

serviceMonitor:
# Set relabelings as per https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig
relabelings: []
# Set metricRelabelings as per https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig
metricRelabelings: []
# Set targetLabels as per https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitorSpec
targetLabels: []
# Set podTargetLabels as per https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitorSpec
podTargetLabels: []


# -- Set metrics you want to enable
metrics:
# -- Percentage of ephemeral storage used by a container in a pod
Expand Down

0 comments on commit a88f195

Please sign in to comment.