Skip to content

Commit

Permalink
Check serviceMonitor.create for ConfigMap and Endpoint
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

* feat: serviceMonitor.create for cm and ep
* feat: run pre-commit hooks, bump 0.6.0
  • Loading branch information
in0rdr committed Sep 16, 2024
1 parent badd947 commit 78098fa
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
Binary file added charts/vault-monitoring/.Chart.yaml.swp
Binary file not shown.
4 changes: 2 additions & 2 deletions charts/vault-monitoring/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: vault-monitoring
description: monitor your vault server from within Kubernetes' prometheus
type: application
version: 0.5.0
version: 0.6.0
home: https://github.com/adfinis/helm-charts/tree/main/charts/vault-monitoring
sources:
- https://github.com/adfinis/helm-charts/tree/main/charts/vault-monitoring
Expand All @@ -13,4 +13,4 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: changed
description: "Only create service vault-monitoring when serviceMonitor.create=true"
description: "Only create ConfigMap and Endpoint when serviceMonitor.create=true"
2 changes: 1 addition & 1 deletion charts/vault-monitoring/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 78098fa

Please sign in to comment.