From 3af14c47c78a786837f7bda9031ec96a18aa6555 Mon Sep 17 00:00:00 2001 From: Daniel Simionato Date: Sat, 18 Sep 2021 16:02:43 +0200 Subject: [PATCH 1/2] Added the ability do define resource requests/limits for the containers in the upgrade/cleanup job. Signed-off-by: Daniel Simionato --- charts/velero/templates/cleanup-crds.yaml | 4 ++++ charts/velero/templates/upgrade-crds.yaml | 8 ++++++++ charts/velero/values.yaml | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/charts/velero/templates/cleanup-crds.yaml b/charts/velero/templates/cleanup-crds.yaml index d8728150..069a6dd4 100644 --- a/charts/velero/templates/cleanup-crds.yaml +++ b/charts/velero/templates/cleanup-crds.yaml @@ -53,6 +53,10 @@ spec: kubectl delete volumesnapshotlocation --all; kubectl delete podvolumerestore --all; kubectl delete crd -l app.kubernetes.io/name=velero; + {{- with .Values.kubectl.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} restartPolicy: OnFailure {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/velero/templates/upgrade-crds.yaml b/charts/velero/templates/upgrade-crds.yaml index e84e6152..84f7c1b7 100644 --- a/charts/velero/templates/upgrade-crds.yaml +++ b/charts/velero/templates/upgrade-crds.yaml @@ -45,6 +45,10 @@ spec: - /bin/sh - -c - /velero install --crds-only --dry-run -o yaml > /tmp/crds.yaml + {{- with .Values.kubectl.initResources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: - mountPath: /tmp name: crds @@ -62,6 +66,10 @@ spec: - /bin/sh - -c - kubectl apply -f /tmp/crds.yaml + {{- with .Values.kubectl.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: - mountPath: /tmp name: crds diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index 516b5a99..ab00b5cb 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -122,6 +122,10 @@ kubectl: # digest: # kubectl image tag. If used, it will take precedence over the cluster Kubernetes version. # tag: 1.16.15 + # Resource requests/limits to specify for the upgrade/cleanup job. Optional + resources: {} + # Resource requests/limits to specify for the initContainer in the upgrade/cleanup job. Optional + initResources: {} # Annotations to set for the upgrade/cleanup job. Optional. annotations: {} # Labels to set for the upgrade/cleanup job. Optional. From d63d956af052ea09525eb7e04df98f9ed0ca9d9c Mon Sep 17 00:00:00 2001 From: Daniel Simionato Date: Sat, 18 Sep 2021 16:25:30 +0200 Subject: [PATCH 2/2] Bump chart version Signed-off-by: Daniel Simionato --- charts/velero/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/velero/Chart.yaml b/charts/velero/Chart.yaml index 9b8a3050..d54bf930 100644 --- a/charts/velero/Chart.yaml +++ b/charts/velero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 1.6.3 description: A Helm chart for velero name: velero -version: 2.23.8 +version: 2.23.9 home: https://github.com/vmware-tanzu/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: