feat(testing): Write new persistence GUI and move persistence into includes
This commit is contained in:
parent
b6dd1564f4
commit
1ff3b745e0
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -170,6 +170,16 @@ include_questions(){
|
|||
/# Include{serviceList}/ { for (i=0;i<n;++i) print a[i]; next }
|
||||
1' templates/questions/serviceList.yaml ${target}/questions.yaml > 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<n;++i) print a[i]; next }
|
||||
1' templates/questions/persistenceBasic.yaml ${target}/questions.yaml > 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<n;++i) print a[i]; next }
|
||||
1' templates/questions/persistenceAdvanced.yaml ${target}/questions.yaml > 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<n;++i) print a[i]; next }
|
||||
|
|
Loading…
Reference in New Issue