Skip to content

Commit

Permalink
feat: serviceMonitor.create for cm and ep
Browse files Browse the repository at this point in the history
This checks if the serviceMonitor should be created before applying
ConfigMap and Endpoint. Example use case: Only install PrometheusRules
  • Loading branch information
in0rdr committed Sep 13, 2024
1 parent badd947 commit d3a8a23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions charts/vault-monitoring/ci/default-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ vault:
create: true
labels:
k8s.example.com/prometheus: kube-prometheus
prometheusRules:
enabled: false
2 changes: 1 addition & 1 deletion charts/vault-monitoring/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.vault.serviceMonitor.authentication }}
{{- if and (.Values.vault.serviceMonitor.authentication) (.Values.vault.serviceMonitor.create) }}
apiVersion: "v1"
kind: "ConfigMap"
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vault-monitoring/templates/endpoint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .Values.vault.service.type "ExternalName" }}
{{- if and (eq .Values.vault.service.type "ExternalName") (.Values.vault.serviceMonitor.create) }}
apiVersion: v1
kind: Endpoints
metadata:
Expand Down

0 comments on commit d3a8a23

Please sign in to comment.