-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow to create a secret for basic auth
This allows to create a secret which can be used for basic authentication in ingresses Signed-off-by: nick <nick@nine.ch>
- Loading branch information
1 parent
8a8f4fd
commit 37c4841
Showing
4 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
charts/kube-prometheus-stack/templates/alertmanager/secretBasicAuth.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if .Values.alertmanager.basicAuthSecret.data -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: alertmanager-{{ template "kube-prometheus-stack.fullname" . }}-basic-auth | ||
namespace: {{ template "kube-prometheus-stack.namespace" . }} | ||
{{- if .Values.alertmanager.basicAuthSecret.annotations }} | ||
annotations: | ||
{{ toYaml .Values.alertmanager.basicAuthSecret.annotations | indent 4 }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "kube-prometheus-stack.name" . }}-alertmanager | ||
app.kubernetes.io/component: alertmanager | ||
{{ include "kube-prometheus-stack.labels" . | indent 4 }} | ||
data: | ||
{{- range $key, $val := .Values.alertmanager.basicAuthSecret.data }} | ||
{{ $key }}: {{ $val | b64enc | quote }} | ||
{{- end }} | ||
{{- end }} |
19 changes: 19 additions & 0 deletions
19
charts/kube-prometheus-stack/templates/prometheus/secretBasicAuth.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if .Values.prometheus.basicAuthSecret.data -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: prometheus-{{ template "kube-prometheus-stack.fullname" . }}-basic-auth | ||
namespace: {{ template "kube-prometheus-stack.namespace" . }} | ||
{{- if .Values.prometheus.basicAuthSecret.annotations }} | ||
annotations: | ||
{{ toYaml .Values.prometheus.basicAuthSecret.annotations | indent 4 }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "kube-prometheus-stack.name" . }}-prometheus | ||
app.kubernetes.io/component: prometheus | ||
{{ include "kube-prometheus-stack.labels" . | indent 4 }} | ||
data: | ||
{{- range $key, $val := .Values.prometheus.basicAuthSecret.data }} | ||
{{ $key }}: {{ $val | b64enc | quote }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters