Skip to content

Commit

Permalink
Save password in secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-gladkii committed Jul 16, 2024
1 parent 56773f7 commit e74923b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/jena-fuseki/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "jena-fuseki.fullname" . }}
key: password
ports:
- name: http
containerPort: {{ .Values.service.port }}
Expand Down
6 changes: 6 additions & 0 deletions charts/jena-fuseki/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "jena-fuseki.fullname" . }}
data:
password: {{ .Values.password | default (randAlphaNum 16) | b64enc }}
2 changes: 2 additions & 0 deletions charts/jena-fuseki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@ nodeSelector: {}
tolerations: []

affinity: {}

password: ""

0 comments on commit e74923b

Please sign in to comment.