Skip to content

Commit

Permalink
Ledger: Add admin password support
Browse files Browse the repository at this point in the history
  • Loading branch information
NoUseFreak committed May 10, 2020
1 parent 89cccd9 commit c0a2cc8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/ledger/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: ledger
description: A ledger for your CD pipeline
version: 0.1.4
appVersion: 0.1.4
version: 0.1.5
appVersion: 0.1.5
sources:
- https://github.com/stenic/helm-charts/tree/master/charts/ledger
13 changes: 13 additions & 0 deletions charts/ledger/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "ledger.fullname" . }}
labels:
{{- include "ledger.labels" . | nindent 4 }}
type: Opaque
data:
{{ if .Values.adminPassword -}}
ledger-admin-password: {{ .Values.adminPassword | b64enc | quote }}
{{ else -}}
ledger-admin-password: {{ randAlphaNum 10 | b64enc | quote }}
{{ end -}}
5 changes: 5 additions & 0 deletions charts/ledger/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ spec:
env:
- name: LEDGER_PORT
value: "8080"
- name: LEDGER_ADMINPASSWORD
valueFrom:
secretKeyRef:
name: {{ template "ledger.fullname" . }}
key: ledger-admin-password
ports:
- name: http
containerPort: 8080
Expand Down

0 comments on commit c0a2cc8

Please sign in to comment.