From 685fd9d5d5cf7e1e33fe65d8926bcb1c21dde225 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.yaml | 10 ++++++++++ chart/templates/default-setting.yaml | 1 + chart/values.yaml | 1 + 3 files changed, 12 insertions(+) diff --git a/chart/questions.yaml b/chart/questions.yaml index 6446aa3..f31d64b 100644 --- a/chart/questions.yaml +++ b/chart/questions.yaml @@ -330,6 +330,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 e2df564..15b73ae 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 3374891..47afe36 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -108,6 +108,7 @@ defaultSettings: defaultReplicaCount: ~ defaultLonghornStaticStorageClass: ~ backupstorePollInterval: ~ + failedBackupTTL: ~ taintToleration: ~ systemManagedComponentsNodeSelector: ~ priorityClass: ~