From 721abcba0b378a2b2695b79d056be68c903a81f1 Mon Sep 17 00:00:00 2001 From: Navratan Lal Gupta <37469234+navilg@users.noreply.github.com> Date: Thu, 25 Jul 2024 13:40:23 +0530 Subject: [PATCH] [velero] feat: Adds --keep-latest-jobs-count for repository maintenance job (#604) * feat: Adds --keep-latest-jobs-count for repository maintenance job Signed-off-by: Navratan Lal Gupta * adds comment to explain .configuration.repositoryMaintenanceJob.keepLatestJobsCount Signed-off-by: Navratan Lal Gupta * replaces .configuration.repositoryMaintenanceJob.keepLatestJobsCount key with .configuration.repositoryMaintenanceJob.latestJobsCount Signed-off-by: Navratan Lal Gupta * fix: invalid argument for --keep-latest-maintenance-jobs flag Signed-off-by: Navratan Lal Gupta --------- Signed-off-by: Navratan Lal Gupta --- charts/velero/Chart.yaml | 2 +- charts/velero/templates/deployment.yaml | 3 +++ charts/velero/values.yaml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/velero/Chart.yaml b/charts/velero/Chart.yaml index e9802342..a879d922 100644 --- a/charts/velero/Chart.yaml +++ b/charts/velero/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 1.14.0 kubeVersion: ">=1.16.0-0" description: A Helm chart for velero name: velero -version: 7.1.2 +version: 7.1.3 home: https://github.com/vmware-tanzu/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: diff --git a/charts/velero/templates/deployment.yaml b/charts/velero/templates/deployment.yaml index 64cd250c..e56cfda3 100644 --- a/charts/velero/templates/deployment.yaml +++ b/charts/velero/templates/deployment.yaml @@ -183,6 +183,9 @@ spec: - --maintenance-job-mem-limit={{ . }} {{- end }} {{- end }} + {{- with .latestJobsCount }} + - --keep-latest-maintenance-jobs={{ . }} + {{- end }} {{- end }} {{- with .extraArgs }} ### User-supplied overwrite flags diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index 46995c2e..7a9c18ea 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -449,6 +449,8 @@ configuration: limits: # cpu: 1000m # memory: 1024Mi + # Number of latest maintenance jobs to keep for each repository + latestJobsCount: 3 # `velero server` default: velero namespace: # additional command-line arguments that will be passed to the `velero server`