Skip to content

Commit

Permalink
[kube-prometheus-stack] add extraVolumes and extraVolumeMounts to pro…
Browse files Browse the repository at this point in the history
…metheus-operator deployment

Signed-off-by: emilkor1 <[email protected]>
  • Loading branch information
emilkor1 committed Feb 27, 2024
1 parent 5b35009 commit 9e6a56e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 56.12.0
version: 56.13.0
appVersion: v0.71.2
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,25 @@ spec:
{{ toYaml .Values.prometheusOperator.resources | indent 12 }}
securityContext:
{{ toYaml .Values.prometheusOperator.containerSecurityContext | indent 12 }}
{{- if .Values.prometheusOperator.tls.enabled }}
volumeMounts:
{{- if .Values.prometheusOperator.tls.enabled }}
- name: tls-secret
mountPath: /cert
readOnly: true
{{- end }}
{{- with .Values.prometheusOperator.extraVolumeMounts }}
{{ toYaml . | nindent 12 }}
{{- end }}
volumes:
{{- if .Values.prometheusOperator.tls.enabled }}
- name: tls-secret
secret:
defaultMode: 420
secretName: {{ template "kube-prometheus-stack.fullname" . }}-admission
{{- end }}
{{- with .Values.prometheusOperator.extraVolumes }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.prometheusOperator.dnsConfig }}
dnsConfig:
Expand Down
8 changes: 8 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2756,6 +2756,14 @@ prometheusOperator:
##
automountServiceAccountToken: true

## Additional volumes
##
extraVolumes: []

## Additional volume mounts
##
extraVolumeMounts: []

## Deploy a Prometheus instance
##
prometheus:
Expand Down

0 comments on commit 9e6a56e

Please sign in to comment.