-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kubernetes service monitors (#1051)
* Add kubernetes service monitors * Update smon names * Update README.md with readme-generator-for-helm Signed-off-by: DeeAjayi <DeeAjayi@users.noreply.github.com> * fix EOF error * update template * update template * update kubestatemetric references * update prometheus endpoint * update indent * typo fix --------- Signed-off-by: DeeAjayi <DeeAjayi@users.noreply.github.com> Co-authored-by: DeeAjayi <DeeAjayi@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
430 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v2 | ||
name: tfy-prometheus-config | ||
description: A Helm chart for Prometheus Config | ||
version: 0.1.1-rc.3 | ||
version: 0.1.1-rc.4 |
Large diffs are not rendered by default.
Oops, something went wrong.
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
16 changes: 16 additions & 0 deletions
16
charts/tfy-prometheus-config/templates/serviceMonitors/alert-manager.yaml
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,16 @@ | ||
{{- if .Values.serviceMonitors.alertManager.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
{{- include "alert-manager.labels" . | nindent 4 }} | ||
name: {{ .Values.serviceMonitors.alertManager.name }} | ||
spec: | ||
endpoints: | ||
{{- toYaml .Values.serviceMonitors.alertManager.endpoints | nindent 2 }} | ||
namespaceSelector: | ||
{{- toYaml .Values.serviceMonitors.alertManager.namespaceSelector | nindent 4 }} | ||
selector: | ||
matchLabels: | ||
{{- toYaml .Values.serviceMonitors.alertManager.serviceSelectorLabels | nindent 6 }} | ||
{{- end -}} |
15 changes: 15 additions & 0 deletions
15
charts/tfy-prometheus-config/templates/serviceMonitors/kube-state-metrics.yaml
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,15 @@ | ||
{{- if .Values.serviceMonitors.kubeStateMetrics.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ .Values.serviceMonitors.kubeStateMetrics.name }} | ||
labels: | ||
{{- include "kubeStateMetrics.labels" . | nindent 4 }} | ||
spec: | ||
endpoints: | ||
{{- toYaml .Values.serviceMonitors.kubeStateMetrics.endpoints | nindent 2 }} | ||
jobLabel: {{ .Values.serviceMonitors.kubeStateMetrics.jobLabel }} | ||
selector: | ||
matchLabels: | ||
{{- toYaml .Values.serviceMonitors.kubeStateMetrics.serviceSelectorLabels | nindent 6 }} | ||
{{- end }} |
19 changes: 19 additions & 0 deletions
19
charts/tfy-prometheus-config/templates/serviceMonitors/kubelet.yaml
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,19 @@ | ||
{{- if .Values.serviceMonitors.kubelet.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
{{- include "kubelet.labels" . | nindent 4 }} | ||
name: {{ .Values.serviceMonitors.kubelet.name }} | ||
spec: | ||
jobLabel: {{ .Values.serviceMonitors.kubelet.jobLabel }} | ||
attachMetadata: | ||
node: false | ||
endpoints: | ||
{{- toYaml .Values.serviceMonitors.kubelet.endpoints | nindent 2 }} | ||
namespaceSelector: | ||
{{- toYaml .Values.serviceMonitors.kubelet.namespaceSelector | nindent 4 }} | ||
selector: | ||
matchLabels: | ||
{{- toYaml .Values.serviceMonitors.kubelet.serviceSelectorLabels | nindent 6 }} | ||
{{- end -}} |
19 changes: 19 additions & 0 deletions
19
charts/tfy-prometheus-config/templates/serviceMonitors/node-exporter.yaml
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,19 @@ | ||
{{- if .Values.serviceMonitors.nodeExporter.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
{{- include "nodeExporter.labels" . | nindent 4 }} | ||
name: {{ .Values.serviceMonitors.nodeExporter.name }} | ||
spec: | ||
jobLabel: {{ .Values.serviceMonitors.nodeExporter.jobLabel }} | ||
attachMetadata: | ||
node: false | ||
endpoints: | ||
{{- toYaml .Values.serviceMonitors.nodeExporter.endpoints | nindent 2 }} | ||
namespaceSelector: | ||
{{- toYaml .Values.serviceMonitors.nodeExporter.namespaceSelector | nindent 4 }} | ||
selector: | ||
matchLabels: | ||
{{- toYaml .Values.serviceMonitors.nodeExporter.serviceSelectorLabels | nindent 6 }} | ||
{{- 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
Oops, something went wrong.