From 85e1f77023df7691bb5765c520b6b9fb8cbcd422 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Thu, 6 Jul 2023 23:07:22 +0300 Subject: [PATCH] chore(questions): update autoperm UI (#10194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- .../persistence/persistenceBasic.yaml | 53 ++++++++++--------- .../persistence/persistenceList.yaml | 43 ++++++++++++--- 2 files changed, 64 insertions(+), 32 deletions(-) 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: