Skip to content
Snippets Groups Projects
Commit ff36bec7 authored by Eduardo Trujillo's avatar Eduardo Trujillo
Browse files

feat(chart): Add support for storing config in secrets

parent 8cd54fde
No related branches found
No related tags found
No related merge requests found
{{- $fullName := include "chart.fullname" . -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "chart.fullname" . }}
name: {{ $fullName }}
labels:
{{- include "chart.labels" . | nindent 4 }}
spec:
......@@ -33,8 +34,19 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ['/usr/bin/espresso']
args:
- serve
env:
{{- if .Values.secretEnvVars }}
{{- range $index, $value := .Values.secretEnvVars }}
- name: {{ $index }}
valueFrom:
secretKeyRef:
name: {{ $fullName }}
key: {{ $index }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: 80
......
apiVersion: v1
kind: Secret
metadata:
name: {{ include "chart.fullname" . }}
labels:
{{- include "chart.labels" . | nindent 4 }}
data:
{{- range $index, $value := .Values.secretEnvVars }}
{{ $index }}: {{ $value | b64enc }}
{{- end }}
......@@ -26,6 +26,11 @@ config: |
[unbundler]
poll_seconds = 10
# Specify additional environment variables to be passed to the Espresso server,
# stored as a Kubernetes secret.
secretEnvVars: {}
# ESPRESSO_BUNDLE: '{access_key = "XXXX", secret_key = "XXXX"}'
serviceAccount:
# Specifies whether a service account should be created
create: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment