diff --git a/charts/incubator/testrc2/questions.yaml b/charts/incubator/testrc2/questions.yaml index 18f52b86799..1d59f3b0e01 100644 --- a/charts/incubator/testrc2/questions.yaml +++ b/charts/incubator/testrc2/questions.yaml @@ -187,112 +187,38 @@ questions: schema: type: boolean default: true + hidden: true - variable: type - label: "(Advanced) Type of Storage" - description: "Sets the persistence type" + label: "Type of Storage" + description: "Sets the persistence type, Anything other than PVC could break rollback!" schema: type: string - default: "pvc" + default: "simpleHP" enum: - - value: "pvc" - description: "pvc" + - value: "simplePVC" + description: "PVC (simple)" + - value: "simpleHP" + description: "HostPath (simple)" - value: "emptyDir" description: "emptyDir" + - value: "pvc" + description: "pvc" - value: "hostPath" description: "hostPath" - - variable: storageClass - label: "(Advanced) storageClass" - description: " Warning: Anything other than SCALE-ZFS will break rollback!" - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "SCALE-ZFS" - - variable: labelsList - label: "Labels" - schema: - type: list - default: [] - items: - - variable: labelItem - label: "Label" - schema: - type: dict - attrs: - - variable: name - label: "Name" - schema: - type: string - - variable: value - label: "Value" - schema: - type: string - - variable: annotationsList - label: "Annotations" - schema: - type: list - default: [] - items: - - variable: annotationItem - label: "Label" - schema: - type: dict - attrs: - - variable: name - label: "Name" - schema: - type: string - - variable: value - label: "Value" - schema: - type: string - - variable: setPermissions - label: "Automatic Permissions" - description: "Automatically set permissions on install" - schema: - show_if: [["type", "=", "hostPath"]] - type: boolean - default: true - - variable: readOnly - label: "readOnly" - schema: - type: boolean - default: false +# Include{persistenceBasic} - variable: hostPath label: "hostPath" description: "Path inside the container the storage is mounted" schema: show_if: [["type", "=", "hostPath"]] type: hostpath - - variable: hostPathType - label: "hostPath Type" - schema: - show_if: [["type", "=", "hostPath"]] - type: string - default: "" - enum: - - value: "" - description: "Default" - - value: "DirectoryOrCreate" - description: "DirectoryOrCreate" - - value: "Directory" - description: "Directory" - - value: "FileOrCreate" - description: "FileOrCreate" - - value: "File" - description: "File" - - value: "Socket" - description: "Socket" - - value: "CharDevice" - description: "CharDevice" - - value: "BlockDevice" - description: "BlockDevice" - variable: mountPath label: "mountPath" description: "Path inside the container the storage is mounted" schema: type: string default: "/config" - hidden: true + editable: false valid_chars: '^\/([a-zA-Z0-9._-]+\/?)+$' - variable: medium label: "EmptyDir Medium" @@ -305,26 +231,8 @@ questions: description: "Default" - value: "Memory" description: "Memory" - - variable: accessMode - label: "Access Mode (Advanced)" - description: "Allow or disallow multiple PVC's writhing to the same PV" - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "ReadWriteOnce" - enum: - - value: "ReadWriteOnce" - description: "ReadWriteOnce" - - value: "ReadOnlyMany" - description: "ReadOnlyMany" - - value: "ReadWriteMany" - description: "ReadWriteMany" - - variable: size - label: "Size quotum of storage" - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "100Gi" +# Include{persistenceAdvanced} + # Include{persistenceList} - variable: ingress diff --git a/templates/questions/persistenceAdvanced.yaml b/templates/questions/persistenceAdvanced.yaml new file mode 100644 index 00000000000..b85b4ae9c14 --- /dev/null +++ b/templates/questions/persistenceAdvanced.yaml @@ -0,0 +1,95 @@ + - variable: size + label: "Size quotum of storage" + schema: + show_if: [["type", "=", "pvc"]] + type: string + default: "999Gi" + - variable: hostPathType + label: "(Advanced) hostPath Type" + schema: + show_if: [["type", "=", "hostPath"]] + type: string + default: "" + enum: + - value: "" + description: "Default" + - value: "DirectoryOrCreate" + description: "DirectoryOrCreate" + - value: "Directory" + description: "Directory" + - value: "FileOrCreate" + description: "FileOrCreate" + - value: "File" + description: "File" + - value: "Socket" + description: "Socket" + - value: "CharDevice" + description: "CharDevice" + - value: "BlockDevice" + description: "BlockDevice" + - variable: storageClass + label: "(Advanced) storageClass" + description: "Warning: Anything other than SCALE-ZFS or empty will break rollback!" + schema: + show_if: [["type", "=", "pvc"]] + type: string + default: "SCALE-ZFS" + - variable: accessMode + label: "(Advanced) Access Mode" + description: "Allow or disallow multiple PVC's writhing to the same PV" + schema: + show_if: [["type", "=", "pvc"]] + type: string + default: "ReadWriteOnce" + enum: + - value: "ReadWriteOnce" + description: "ReadWriteOnce" + - value: "ReadOnlyMany" + description: "ReadOnlyMany" + - value: "ReadWriteMany" + description: "ReadWriteMany" + - variable: advanced + label: "Show Advanced Options" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: labelsList + label: "Labels" + schema: + type: list + default: [] + items: + - variable: labelItem + label: "Label" + schema: + type: dict + attrs: + - variable: name + label: "Name" + schema: + type: string + - variable: value + label: "Value" + schema: + type: string + - variable: annotationsList + label: "Annotations" + schema: + type: list + default: [] + items: + - variable: annotationItem + label: "Label" + schema: + type: dict + attrs: + - variable: name + label: "Name" + schema: + type: string + - variable: value + label: "Value" + schema: + type: string diff --git a/templates/questions/persistenceBasic.yaml b/templates/questions/persistenceBasic.yaml new file mode 100644 index 00000000000..5ee9100f317 --- /dev/null +++ b/templates/questions/persistenceBasic.yaml @@ -0,0 +1,25 @@ + - variable: setPermissionsSimple + label: "Automatic Permissions" + description: "Automatically set permissions on install" + schema: + show_if: [["type", "=", "simpleHP"]] + type: boolean + default: true + - variable: setPermissions + label: "Automatic Permissions" + description: "Automatically set permissions on install" + schema: + show_if: [["type", "=", "hostPath"]] + type: boolean + default: true + - variable: readOnly + label: "readOnly" + schema: + type: boolean + default: false + - variable: hostPathSimple + label: "hostPath" + description: "Path inside the container the storage is mounted" + schema: + show_if: [["type", "=", "simpleHP"]] + type: hostpath diff --git a/tools/build-release.sh b/tools/build-release.sh index 8b3b2f3208c..6697bbd5e4b 100755 --- a/tools/build-release.sh +++ b/tools/build-release.sh @@ -170,6 +170,16 @@ include_questions(){ /# Include{serviceList}/ { for (i=0;i tmp && mv tmp ${target}/questions.yaml + # Replace # Include{persistenceBasic} with the standard persistenceBasic codesnippet + awk 'NR==FNR { a[n++]=$0; next } + /# Include{persistenceBasic}/ { for (i=0;i tmp && mv tmp ${target}/questions.yaml + + # Replace # Include{persistenceAdvanced} with the standard persistenceAdvanced codesnippet + awk 'NR==FNR { a[n++]=$0; next } + /# Include{persistenceAdvanced}/ { for (i=0;i tmp && mv tmp ${target}/questions.yaml + # Replace # Include{persistenceList} with the standard persistenceList codesnippet awk 'NR==FNR { a[n++]=$0; next } /# Include{persistenceList}/ { for (i=0;i