From ef5f947940e686360a3d96cb53820702d4ccdfc1 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Wed, 7 Feb 2024 00:35:18 +0100 Subject: [PATCH] feat(GUI): add velero backup schedule to GUI templates (#17993) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** We will expose a per-app setting to create velero backup schedules for them. This adds the GUI templates and such **โš™๏ธ 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:** - [x] โš–๏ธ My code follows the style guidelines of this project - [x] ๐Ÿ‘€ I have performed a self-review of my own code - [x] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [x] ๐Ÿ“„ I have made corresponding changes to the documentation - [x] โš ๏ธ My changes generate no new warnings - [x] ๐Ÿงช I have added tests to this description that prove my fix is effective or that my feature works - [x] โฌ†๏ธ 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. - [x] ๐Ÿ–ผ๏ธ 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._ --------- Signed-off-by: Kjeld Schouten Signed-off-by: Kjeld Schouten --- charts/enterprise/velero/Chart.yaml | 4 +- charts/enterprise/velero/questions.yaml | 51 +------------------ charts/stable/jackett/Chart.yaml | 4 +- charts/stable/jackett/questions.yaml | 1 + templates/questions/general/groups.yaml | 2 + .../questions/velero/veleroSchedule.yaml | 50 ++++++++++++++++++ 6 files changed, 58 insertions(+), 54 deletions(-) create mode 100644 templates/questions/velero/veleroSchedule.yaml diff --git a/charts/enterprise/velero/Chart.yaml b/charts/enterprise/velero/Chart.yaml index 8ac2c59e5b6..905c1888b7d 100644 --- a/charts/enterprise/velero/Chart.yaml +++ b/charts/enterprise/velero/Chart.yaml @@ -10,7 +10,7 @@ apiVersion: v2 appVersion: latest dependencies: - name: common - version: 17.2.30 + version: 17.3.0 repository: oci://tccr.io/truecharts condition: "" alias: "" @@ -42,4 +42,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/enterprise/velero - https://github.com/truecharts/containers/tree/master/apps/alpine type: application -version: 3.2.1 +version: 3.2.2 diff --git a/charts/enterprise/velero/questions.yaml b/charts/enterprise/velero/questions.yaml index 971166170bf..ea86da7e72f 100644 --- a/charts/enterprise/velero/questions.yaml +++ b/charts/enterprise/velero/questions.yaml @@ -254,53 +254,4 @@ questions: schema: type: string default: "" - - variable: schedules - group: "App Configuration" - label: "Pre-Defined Backup Schedules" - schema: - type: dict - additional_attrs: true - attrs: - - variable: default - label: "Default Schedule" - schema: - type: dict - additional_attrs: true - attrs: - - variable: disabled - label: "disabled" - schema: - type: boolean - default: true - - variable: schedule - label: "schedule" - show_if: [["disabled", "=", false]] - schema: - type: string - required: true - default: "0 0 0 * * *" - - variable: useOwnerReferencesInBackup - label: "useOwnerReferencesInBackup" - show_if: [["disabled", "=", false]] - schema: - type: boolean - default: false - - variable: template - label: template - show_if: [["disabled", "=", false]] - schema: - additional_attrs: true - type: dict - attrs: - - variable: ttl - label: "ttl" - schema: - type: string - required: true - default: "240h" - - variable: storageLocation - label: "storageLocation" - schema: - type: string - required: true - default: "default" +# Include{veleroSchedule} diff --git a/charts/stable/jackett/Chart.yaml b/charts/stable/jackett/Chart.yaml index 2b7dbefa0bd..030baeee45a 100644 --- a/charts/stable/jackett/Chart.yaml +++ b/charts/stable/jackett/Chart.yaml @@ -10,7 +10,7 @@ apiVersion: v2 appVersion: 0.21.1155 dependencies: - name: common - version: 17.2.30 + version: 17.3.0 repository: oci://tccr.io/truecharts condition: "" alias: "" @@ -35,4 +35,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/jackett - https://ghcr.io/linuxserver/jackett type: application -version: 18.1.11 +version: 18.1.12 diff --git a/charts/stable/jackett/questions.yaml b/charts/stable/jackett/questions.yaml index ca54e03fe7c..f6494aa73e5 100644 --- a/charts/stable/jackett/questions.yaml +++ b/charts/stable/jackett/questions.yaml @@ -81,4 +81,5 @@ questions: # Include{codeserver} # Include{netshoot} # Include{vpn} +# Include{veleroSchedule} # Include{documentation} diff --git a/templates/questions/general/groups.yaml b/templates/questions/general/groups.yaml index d6688f608f5..453e0cdfb7e 100644 --- a/templates/questions/general/groups.yaml +++ b/templates/questions/general/groups.yaml @@ -23,6 +23,8 @@ groups: description: Metrics - name: Addons description: Addon Configuration + - name: Backup Configuration + description: Configure Velero Backup Schedule - name: Advanced description: Advanced Configuration - name: Postgresql diff --git a/templates/questions/velero/veleroSchedule.yaml b/templates/questions/velero/veleroSchedule.yaml new file mode 100644 index 00000000000..62aedd213a7 --- /dev/null +++ b/templates/questions/velero/veleroSchedule.yaml @@ -0,0 +1,50 @@ + - variable: schedules + group: "Backup Configuration" + label: "Backup Schedules" + schema: + type: dict + additional_attrs: true + attrs: + - variable: default + label: "Default Schedule" + schema: + type: dict + additional_attrs: true + attrs: + - variable: enabled + label: "enabled" + schema: + type: boolean + default: false + - variable: schedule + label: "schedule" + show_if: [["enabled", "=", true]] + schema: + type: string + required: true + default: "0 0 0 * * *" + - variable: useOwnerReferencesInBackup + label: "useOwnerReferencesInBackup" + show_if: [["enabled", "=", true]] + schema: + type: boolean + default: false + - variable: template + label: template + show_if: [["enabled", "=", true]] + schema: + additional_attrs: true + type: dict + attrs: + - variable: ttl + label: "ttl" + schema: + type: string + required: true + default: "240h" + - variable: storageLocation + label: "storageLocation" + schema: + type: string + required: true + default: "default"