diff --git a/templates/questions/persistence/persistenceBasic.yaml b/templates/questions/persistence/persistenceBasic.yaml index ef31c708082..b0aacec9788 100644 --- a/templates/questions/persistence/persistenceBasic.yaml +++ b/templates/questions/persistence/persistenceBasic.yaml @@ -25,14 +25,6 @@ show_if: [["type", "=", "nfs"]] type: string default: "" - - variable: setPermissions - label: Automatic Permissions - description: Automatically set permissions on install - schema: - show_if: [["type", "=", "hostPath"]] - hidden: true - type: boolean - default: false - variable: autoPermissions label: Automatic Permissions Configuration description: Automatically set permissions @@ -41,27 +33,36 @@ type: dict additional_attrs: true attrs: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value - schema: - type: string - default: "775" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively + - variable: enabled + label: enabled schema: type: boolean default: false + show_subquestions_if: true + subquestions: + - variable: chown + label: Run CHOWN + description: | + It will run CHOWN on the path with the given fsGroup + schema: + type: boolean + default: false + - variable: chmod + label: Run CHMOD + description: | + It will run CHMOD on the path with the given value
+ Format should be 3 digits, e.g. 770 + schema: + type: string + valid_chars: '[0-9]{3}' + default: "" + - variable: recursive + label: Recursive + description: | + It will run CHOWN and CHMOD recursively + schema: + type: boolean + default: false - variable: readOnly label: Read Only schema: diff --git a/templates/questions/persistence/persistenceList.yaml b/templates/questions/persistence/persistenceList.yaml index c9133d39bea..a62b023d885 100644 --- a/templates/questions/persistence/persistenceList.yaml +++ b/templates/questions/persistence/persistenceList.yaml @@ -44,13 +44,44 @@ show_if: [["type", "=", "nfs"]] type: string default: "" - - variable: setPermissions - label: Automatic Permissions - description: Automatically set permissions on install + - variable: autoPermissions + label: Automatic Permissions Configuration + description: Automatically set permissions schema: - show_if: [["type", "=", "hostPath"]] - type: boolean - default: false + show_if: [["type", "!=", "pvc"]] + type: dict + additional_attrs: true + attrs: + - variable: enabled + label: enabled + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: chown + label: Run CHOWN + description: | + It will run CHOWN on the path with the given fsGroup + schema: + type: boolean + default: false + - variable: chmod + label: Run CHMOD + description: | + It will run CHMOD on the path with the given value
+ Format should be 3 digits, e.g. 770 + schema: + type: string + valid_chars: '[0-9]{3}' + default: "" + - variable: recursive + label: Recursive + description: | + It will run CHOWN and CHMOD recursively + schema: + type: boolean + default: false - variable: readOnly label: Read Only schema: