浏览代码

Render environment variables for minio in a more ui friendly way

Waqar Ahmed 4 年之前
父节点
当前提交
97b7c93410
共有 2 个文件被更改,包括 23 次插入8 次删除
  1. 20 5
      test/minio/1.0.1/questions.yaml
  2. 3 3
      test/minio/1.0.1/templates/deployment.yaml

+ 20 - 5
test/minio/1.0.1/questions.yaml

@@ -102,9 +102,24 @@ questions:
     label: "Minio image environment"
     group: "Minio Configuration"
     schema:
-      type: dict
-      additional_attrs: true
-      attrs: []
+      type: list
+      default: []
+      items:
+        - variable: environmentVariable
+          label: "Environment Variable"
+          schema:
+            type: dict
+            attrs:
+              - variable: name
+                label: "Name"
+                schema:
+                  type: string
+                  required: true
+              - variable: value
+                label: value
+                schema:
+                  type: string
+                  required: true
 
   - variable: service
     description: "Minio Service Configuration"
@@ -146,14 +161,14 @@ questions:
       show_if: [["minioHostPathEnabled", "=", false]]
       attrs:
         - variable: mountPath
-          label: "Mount Path"
+          label: "Minio Data Mount Path"
           description: "Path where the volume will be mounted inside the pod"
           schema:
             type: path
             editable: false
             default: "/export"
         - variable: datasetName
-          label: "Dataset Name"
+          label: "Minio Dataset Name"
           schema:
             type: string
             default: "ix-minio"

+ 3 - 3
test/minio/1.0.1/templates/deployment.yaml

@@ -50,9 +50,9 @@ spec:
                 secretKeyRef:
                   name: {{ template "minio.secretName" . }}
                   key: secretkey
-            {{- range $key, $val := .Values.environment }}
-            - name: {{ $key }}
-              value: {{ $val | quote }}
+            {{- range $envVariable := .Values.environment }}
+            - name: {{ $envVariable.name }}
+              value: {{ $envVariable.value | quote }}
             {{- end}}
       volumes:
         - name: export