From f256b134dc4e3caf76c9367126164dac375b0a7b Mon Sep 17 00:00:00 2001 From: Navratan Lal Gupta <37469234+navilg@users.noreply.github.com> Date: Fri, 19 Jul 2024 17:07:10 +0530 Subject: [PATCH 1/4] feat: Adds --keep-latest-jobs-count for repository maintenance job Signed-off-by: Navratan Lal Gupta --- charts/velero/Chart.yaml | 2 +- charts/velero/templates/deployment.yaml | 1 + charts/velero/values.yaml | 1 + 3 files changed, 3 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..c264df29 100644 --- a/charts/velero/templates/deployment.yaml +++ b/charts/velero/templates/deployment.yaml @@ -183,6 +183,7 @@ spec: - --maintenance-job-mem-limit={{ . }} {{- end }} {{- end }} + - --keep-latest-maintenance-jobs={{ .keepLatestJobsCount }} {{- end }} {{- with .extraArgs }} ### User-supplied overwrite flags diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index 46995c2e..a706972a 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -449,6 +449,7 @@ configuration: limits: # cpu: 1000m # memory: 1024Mi + keepLatestJobsCount: 3 # `velero server` default: velero namespace: # additional command-line arguments that will be passed to the `velero server` From 60301f2a3a68d0c7bc52ab5aca2eaeeed6baa293 Mon Sep 17 00:00:00 2001 From: Navratan Lal Gupta <37469234+navilg@users.noreply.github.com> Date: Fri, 19 Jul 2024 17:13:34 +0530 Subject: [PATCH 2/4] adds comment to explain .configuration.repositoryMaintenanceJob.keepLatestJobsCount Signed-off-by: Navratan Lal Gupta --- charts/velero/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index a706972a..0120238f 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -449,6 +449,7 @@ configuration: limits: # cpu: 1000m # memory: 1024Mi + # Number of latest maintenance jobs to keep for each repository keepLatestJobsCount: 3 # `velero server` default: velero namespace: From 7ee08f5be6b1f143f6c0980346d03d477d860c25 Mon Sep 17 00:00:00 2001 From: Navratan Lal Gupta Date: Fri, 19 Jul 2024 17:35:33 +0530 Subject: [PATCH 3/4] replaces .configuration.repositoryMaintenanceJob.keepLatestJobsCount key with .configuration.repositoryMaintenanceJob.latestJobsCount Signed-off-by: Navratan Lal Gupta --- charts/velero/templates/deployment.yaml | 2 +- charts/velero/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/velero/templates/deployment.yaml b/charts/velero/templates/deployment.yaml index c264df29..d78bcb46 100644 --- a/charts/velero/templates/deployment.yaml +++ b/charts/velero/templates/deployment.yaml @@ -183,7 +183,7 @@ spec: - --maintenance-job-mem-limit={{ . }} {{- end }} {{- end }} - - --keep-latest-maintenance-jobs={{ .keepLatestJobsCount }} + - --keep-latest-maintenance-jobs={{ .latestJobsCount }} {{- end }} {{- with .extraArgs }} ### User-supplied overwrite flags diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index 0120238f..7a9c18ea 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -450,7 +450,7 @@ configuration: # cpu: 1000m # memory: 1024Mi # Number of latest maintenance jobs to keep for each repository - keepLatestJobsCount: 3 + latestJobsCount: 3 # `velero server` default: velero namespace: # additional command-line arguments that will be passed to the `velero server` From e75968be84361ec5cbc0ddbbdb99b47af5ece2b4 Mon Sep 17 00:00:00 2001 From: Navratan Lal Gupta Date: Thu, 25 Jul 2024 12:11:41 +0530 Subject: [PATCH 4/4] fix: invalid argument for --keep-latest-maintenance-jobs flag Signed-off-by: Navratan Lal Gupta --- charts/velero/templates/deployment.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/velero/templates/deployment.yaml b/charts/velero/templates/deployment.yaml index d78bcb46..e56cfda3 100644 --- a/charts/velero/templates/deployment.yaml +++ b/charts/velero/templates/deployment.yaml @@ -183,7 +183,9 @@ spec: - --maintenance-job-mem-limit={{ . }} {{- end }} {{- end }} - - --keep-latest-maintenance-jobs={{ .latestJobsCount }} + {{- with .latestJobsCount }} + - --keep-latest-maintenance-jobs={{ . }} + {{- end }} {{- end }} {{- with .extraArgs }} ### User-supplied overwrite flags