Skip to content

Commit

Permalink
[prometheus] Add configFromSecret support to server (prometheus-commu…
Browse files Browse the repository at this point in the history
…nity#1836)

Signed-off-by: Karolis Labrencis <[email protected]>
  • Loading branch information
KarolisL authored Mar 1, 2022
1 parent 087baed commit 90930fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions charts/prometheus/templates/server/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,13 @@ spec:
terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }}
volumes:
- name: config-volume
{{- if empty .Values.server.configFromSecret }}
configMap:
name: {{ if .Values.server.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.server.configMapOverrideName }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }}
{{- else }}
secret:
secretName: {{ .Values.server.configFromSecret }}
{{- end }}
{{- range .Values.server.extraHostPathMounts }}
- name: {{ .name }}
hostPath:
Expand Down
5 changes: 5 additions & 0 deletions charts/prometheus/templates/server/sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,13 @@ spec:
terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }}
volumes:
- name: config-volume
{{- if empty .Values.server.configFromSecret }}
configMap:
name: {{ if .Values.server.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.server.configMapOverrideName }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }}
{{- else }}
secret:
secretName: {{ .Values.server.configFromSecret }}
{{- end }}
{{- range .Values.server.extraHostPathMounts }}
- name: {{ .name }}
hostPath:
Expand Down

0 comments on commit 90930fc

Please sign in to comment.