From e7715ad51fa3a8c133ac3b6eb27d52f856ffffe5 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 17 Aug 2022 10:41:03 +0800 Subject: [PATCH] Failed backups cleanup: update deploy YAML Add a new option `failed-backup-ttl` and update the LEP for failed backup cleanup. Longhorn 3898 Signed-off-by: James Lu --- chart/questions.yml | 10 ++++++++++ chart/templates/default-setting.yaml | 1 + chart/values.yaml | 1 + 3 files changed, 12 insertions(+) diff --git a/chart/questions.yml b/chart/questions.yml index 58c8c2e..1de5e9b 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -324,6 +324,16 @@ The available volume spec options are: type: int min: 0 default: 300 + - variable: defaultSettings.failedBackupTTL + label: Failed Backup Time to Live + description: "In minutes. This setting determines how long Longhorn will keep the backup resource that was failed. Set to 0 to disable the auto-deletion. +Failed backups will be checked and cleaned up during backupstore polling which is controlled by **Backupstore Poll Interval** setting. +Hence this value determines the minimal wait interval of the cleanup. And the actual cleanup interval is multiple of **Backupstore Poll Interval**. + Disabling **Backupstore Poll Interval** also means to disable failed backup auto-deletion." + group: "Longhorn Default Settings" + type: int + min: 0 + default: 1440 - variable: defaultSettings.autoSalvage label: Automatic salvage description: "If enabled, volumes will be automatically salvaged when all the replicas become faulty e.g. due to network disconnection. Longhorn will try to figure out which replica(s) are usable, then use them for the volume. By default true." diff --git a/chart/templates/default-setting.yaml b/chart/templates/default-setting.yaml index fa4ea49..e0f899b 100644 --- a/chart/templates/default-setting.yaml +++ b/chart/templates/default-setting.yaml @@ -20,6 +20,7 @@ data: {{ if not (kindIs "invalid" .Values.defaultSettings.defaultDataLocality) }}default-data-locality: {{ .Values.defaultSettings.defaultDataLocality }}{{ end }} {{ if not (kindIs "invalid" .Values.defaultSettings.defaultLonghornStaticStorageClass) }}default-longhorn-static-storage-class: {{ .Values.defaultSettings.defaultLonghornStaticStorageClass }}{{ end }} {{ if not (kindIs "invalid" .Values.defaultSettings.backupstorePollInterval) }}backupstore-poll-interval: {{ .Values.defaultSettings.backupstorePollInterval }}{{ end }} + {{ if not (kindIs "invalid" .Values.defaultSettings.failedBackupTTL) }}failed-backup-ttl: {{ .Values.defaultSettings.failedBackupTTL }}{{ end }} {{- if or (not (kindIs "invalid" .Values.defaultSettings.taintToleration)) (.Values.global.cattle.windowsCluster.enabled) }} taint-toleration: {{ $windowsDefaultSettingTaintToleration := list }}{{ $defaultSettingTaintToleration := list -}} {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.defaultSetting.taintToleration -}} diff --git a/chart/values.yaml b/chart/values.yaml index c566ca9..31e17a3 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -105,6 +105,7 @@ defaultSettings: defaultReplicaCount: ~ defaultLonghornStaticStorageClass: ~ backupstorePollInterval: ~ + failedBackupTTL: ~ taintToleration: ~ systemManagedComponentsNodeSelector: ~ priorityClass: ~