-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add grafana-auth Kubernetes secret to handle pgsql connection for Gra…
…fana securely (#568) * Adding grafana-auth db secret for grafana to connect to pgsql * Added sslmode key to Helm helper function, for only grafana, but this conditional could be removed and `optional:true` added to allow this for other database connections * Regenerated docs via scripts/helm-docs.sh
- Loading branch information
1 parent
89c0fa6
commit 3b0546a
Showing
6 changed files
with
58 additions
and
5 deletions.
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
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
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
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
18 changes: 18 additions & 0 deletions
18
charts/sourcegraph/templates/grafana/grafana.pgsql.Secret.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,18 @@ | ||
{{- if and .Values.grafana.auth (not .Values.grafana.auth.existingSecret) }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ .Values.grafana.name }}-auth | ||
labels: | ||
app: grafana | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: grafana | ||
type: Opaque | ||
data: | ||
database: {{ .Values.grafana.auth.database | toString | b64enc | quote }} | ||
host: {{ .Values.grafana.auth.host | toString | b64enc | quote }} | ||
password: {{ .Values.grafana.auth.password | toString | b64enc | quote }} | ||
port: {{ .Values.grafana.auth.port | toString | b64enc | quote }} | ||
sslmode: {{ .Values.grafana.auth.sslmode | toString | b64enc | quote }} | ||
user: {{ .Values.grafana.auth.user | toString | b64enc | quote }} | ||
{{- 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