瀏覽代碼

Add support for environment variables

Waqar Ahmed 4 年之前
父節點
當前提交
72b7ad506f
共有 2 個文件被更改,包括 9 次插入3 次删除
  1. 7 0
      charts/ix-chart/v2009.0.1/templates/deployment.yaml
  2. 2 3
      charts/ix-chart/v2009.0.1/values.yaml

+ 7 - 0
charts/ix-chart/v2009.0.1/templates/deployment.yaml

@@ -31,3 +31,10 @@ spec:
             - {{ . | quote}}
             {{- end }}
           {{- end }}
+          {{- if .Values.container.environment_variables }}
+          env:
+            {{- range .Values.container.environment_variables }}
+            - name: {{ .name | quote }}
+              value: {{ .value | quote }}
+            {{- end }}
+          {{- end }}

+ 2 - 3
charts/ix-chart/v2009.0.1/values.yaml

@@ -1,6 +1,4 @@
-# Default values for mychart.
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
+# Default values for ix-chart.
 
 replicaCount: 1
 
@@ -18,3 +16,4 @@ fullnameOverride: ""
 container:
   command: []
   args: []
+  environment_variables: []