From a74c7889fd08399675558071761503d123d6416b Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Mon, 13 Nov 2023 00:09:28 +0100 Subject: [PATCH] feat(SCALE GUI): add gui options for volumeSnapshots (#14607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Adds SCALE GUI options for the soon-to-be-added volumeSnapshots ⚒️ Fixes #14605 **⚙️ Type of change** - [x] ⚙️ 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 | 27 +++++++++++++++++++ .../persistence/persistenceList.yaml | 27 +++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/templates/questions/persistence/persistenceBasic.yaml b/templates/questions/persistence/persistenceBasic.yaml index b0aacec9788..768fbb0ccd5 100644 --- a/templates/questions/persistence/persistenceBasic.yaml +++ b/templates/questions/persistence/persistenceBasic.yaml @@ -92,3 +92,30 @@ show_if: [["type", "=", "pvc"]] type: string default: 256Gi + - variable: volumeSnapshots + label: Volume Snapshots (Experimental) + description: Add an entry to the list to force creation of a volumeSnapshot of this PVC + schema: + show_if: [["type", "=", "pvc"]] + type: list + default: [] + items: + - variable: volumeSnapshotEntry + label: Custom volumeSnapshot + schema: + additional_attrs: true + type: dict + attrs: + - variable: name + label: Name + description: WARNING: renaming this, means deletion of the snapshot with the old name! + schema: + type: string + default: "mysnapshot" + required: true + - variable: volumeSnapshotClassName + label: volumeSnapshot Class Name (Advanced) + description: For use with PVCs using a non-default storageClass + schema: + type: string + default: "" diff --git a/templates/questions/persistence/persistenceList.yaml b/templates/questions/persistence/persistenceList.yaml index a62b023d885..0114bb888a9 100644 --- a/templates/questions/persistence/persistenceList.yaml +++ b/templates/questions/persistence/persistenceList.yaml @@ -118,3 +118,30 @@ show_if: [["type", "=", "pvc"]] type: string default: 256Gi + - variable: volumeSnapshots + label: Volume Snapshots (Experimental) + description: Add an entry to the list to force creation of a volumeSnapshot of this PVC + schema: + show_if: [["type", "=", "pvc"]] + type: list + default: [] + items: + - variable: volumeSnapshotEntry + label: Custom volumeSnapshot + schema: + additional_attrs: true + type: dict + attrs: + - variable: name + label: Name + description: WARNING: renaming this, means deletion of the snapshot with the old name! + schema: + type: string + default: "mysnapshot" + required: true + - variable: volumeSnapshotClassName + label: volumeSnapshot Class Name (Advanced) + description: For use with PVCs using a non-default storageClass + schema: + type: string + default: ""