浏览代码

ci(helm): add custom environment variables to the deployment (#7784)

Co-authored-by: jmp <jmp@icij.org>
Lyz 2 周之前
父节点
当前提交
9f481221ab
共有 2 个文件被更改,包括 14 次插入0 次删除
  1. 3 0
      dev/helm/templates/deployment.yaml
  2. 11 0
      dev/helm/values.yaml

+ 3 - 0
dev/helm/templates/deployment.yaml

@@ -81,6 +81,9 @@ spec:
             {{- end }}
             - name: HA_ACTIVE
               value: {{ .Values.replicaCount | int | le 2 | quote }}
+            {{- with .Values.extraEnvVars }}
+            {{- toYaml . | nindent 12 }}
+            {{- end }}
     {{- with .Values.volumeMounts }}
           volumeMounts:
             {{- toYaml . | nindent 12 }}

+ 11 - 0
dev/helm/values.yaml

@@ -138,6 +138,17 @@ sideload:
 ## Append extra trusted certificates for node process from extra volume via NODE_EXTRA_CA_CERTS variable
 # nodeExtraCaCerts: "/path/to/certs.pem"
 
+## Additional environment variables to set
+extraEnvVars: []
+# extraEnvVars:
+#   - name: CUSTOM_VAR
+#     value: "custom_value"
+#   - name: SECRET_VAR
+#     valueFrom:
+#       secretKeyRef:
+#         name: my-secret
+#         key: secret-key
+
 ## This will override the postgresql chart values
 # externalPostgresql:
 #   # note: ?sslmode=require => ?ssl=true