Skip to content

Commit

Permalink
feat(vault-monitoring): make bearerTokenFile optional (#1196)
Browse files Browse the repository at this point in the history
* feat(vault-monitoring): make bearerTokenFile optional

* annotate in chart.yaml

* using with instead of specifying it twice
  • Loading branch information
pree authored Feb 7, 2024
1 parent 3190243 commit 5283239
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion charts/vault-monitoring/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ apiVersion: v2
name: vault-monitoring
description: monitor your vault server from within Kubernetes' prometheus
type: application
version: 0.2.1
version: 0.3.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
maintainers:
- name: adfinis
email: [email protected]
url: https://adfinis.com
annotations:
artifacthub.io/changes: |
- kind: changed
description: "make bearerTokenFile optional"
3 changes: 2 additions & 1 deletion charts/vault-monitoring/README.md

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

4 changes: 3 additions & 1 deletion charts/vault-monitoring/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ spec:
port: {{ .Values.vault.portName }}
scheme: {{ .Values.vault.scheme }}
scrapeTimeout: {{ .Values.vault.serviceMonitor.scrapeTimeout }}
bearerTokenFile: '/etc/prometheus/config_out/.vault-token'
{{- with .Values.vault.serviceMonitor.bearerTokenFile }}
bearerTokenFile: {{ . | quote }}
{{- end }}
tlsConfig:
{{- if .Values.vault.ca }}
caFile: {{ .Values.vault.ca_path }}
Expand Down
2 changes: 2 additions & 0 deletions charts/vault-monitoring/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ vault:
labels: {}
# -- scrapeTimeout of the serviceMonitor
scrapeTimeout: 30s
# -- Specify a bearerTokenFile for authentication. Keep empty for Unauthenticated access
bearerTokenFile: '/etc/prometheus/config_out/.vault-token'

prometheusRules:
# -- wether or not the prometheus alerts are enabled
Expand Down

0 comments on commit 5283239

Please sign in to comment.