diff --git a/charts/ledger/Chart.yaml b/charts/ledger/Chart.yaml index 1e79ae9..a1e9fb0 100644 --- a/charts/ledger/Chart.yaml +++ b/charts/ledger/Chart.yaml @@ -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 diff --git a/charts/ledger/templates/secret.yaml b/charts/ledger/templates/secret.yaml new file mode 100644 index 0000000..efd98e1 --- /dev/null +++ b/charts/ledger/templates/secret.yaml @@ -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 -}} \ No newline at end of file diff --git a/charts/ledger/templates/statefulset.yaml b/charts/ledger/templates/statefulset.yaml index b2e5969..a5f9ddb 100644 --- a/charts/ledger/templates/statefulset.yaml +++ b/charts/ledger/templates/statefulset.yaml @@ -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