diff --git a/charts/demo-helm/templates/backend.yaml b/charts/demo-helm/templates/backend.yaml index e80c200..87d7c4d 100644 --- a/charts/demo-helm/templates/backend.yaml +++ b/charts/demo-helm/templates/backend.yaml @@ -27,6 +27,12 @@ spec: imagePullPolicy: Always ports: - containerPort: 5000 + env: + - name: RANDOM_DATA + valueFrom: + configMapKeyRef: + name: {{ $.Release.Name }}-{{ $.Chart.Name}}-configmap + key: random_data imagePullSecrets: - name: {{ $.Values.image_pull_secret }} {{- end }} diff --git a/charts/demo-helm/templates/configmap.yaml b/charts/demo-helm/templates/configmap.yaml new file mode 100644 index 0000000..17c52b9 --- /dev/null +++ b/charts/demo-helm/templates/configmap.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $.Release.Name }}-{{ $.Chart.Name}}-configmap +data: + random_data: {{ .Values.random | quote }} \ No newline at end of file diff --git a/charts/demo-helm/values.yaml b/charts/demo-helm/values.yaml index 8b29763..ac0e6de 100644 --- a/charts/demo-helm/values.yaml +++ b/charts/demo-helm/values.yaml @@ -9,3 +9,4 @@ services: image_name: "registry.runcible.io/demo-helm-backend" image_version: "1.1.0" replicas: 1 +random: "tis-random-default" \ No newline at end of file