Skip to content

feat: make backoffLimit configurable for Helm jobs#723

Open
fabioaraujopt wants to merge 5 commits intovmware-tanzu:mainfrom
fabioaraujopt:feature/configurable-backoff-limit
Open

feat: make backoffLimit configurable for Helm jobs#723
fabioaraujopt wants to merge 5 commits intovmware-tanzu:mainfrom
fabioaraujopt:feature/configurable-backoff-limit

Conversation

@fabioaraujopt
Copy link
Copy Markdown

Description

This PR makes the backoffLimit configurable for Velero's Helm job resources, allowing users to adjust retry limits based on their environment needs.

Motivation

The current hardcoded backoffLimit of 3 may be insufficient in environments with:

  • Slow image registries or pull times
  • Network latency issues
  • Resource constraints causing temporary pod failures
  • Image pull authentication delays

This is particularly problematic for the velero-upgrade-crds job which runs as a Helm pre-install/pre-upgrade hook and can cause installation failures when it exceeds the backoff limit.

Changes

  • Added upgradeCRDsJob.backoffLimit configuration (default: 3)
  • Added cleanUpCRDsJob.backoffLimit configuration (default: 3)
  • Added labelNamespaceJob.backoffLimit configuration (default: 3)
  • Updated all job templates to use these configurable values

Backward Compatibility

✅ All defaults are set to 3, maintaining current behavior.

Usage

Users can now override the backoff limit in their values:

upgradeCRDsJob:
  backoffLimit: 10

cleanUpCRDsJob:
  backoffLimit: 5

labelNamespaceJob:
  backoffLimit: 5

Testing

  • Helm template rendering works correctly
  • Default values maintain backward compatibility
  • Custom values are properly applied to job specs

Related Issues

Addresses scenarios where users encounter BackoffLimitExceeded errors during Velero installation.

@jenting
Copy link
Copy Markdown
Collaborator

jenting commented Jan 16, 2026

@fabioaraujopt please help bump chart version, thank you.

@fabioaraujopt
Copy link
Copy Markdown
Author

@fabioaraujopt please help bump chart version, thank you.

fixed

Make backoffLimit configurable for the Velero upgrade, cleanup, and namespace-label jobs while keeping a default of 3. Add nil-safe template fallbacks so upgrades with older or partial values do not fail with nil pointer errors.

Signed-off-by: Fabio Araujo <fabioaraujoorg@gmail.com>
@fabioaraujopt fabioaraujopt force-pushed the feature/configurable-backoff-limit branch from 2813aad to fca386e Compare February 11, 2026 16:04
@fabioaraujopt
Copy link
Copy Markdown
Author

ready to review

Comment thread charts/velero/templates/upgrade-crds/upgrade-crds.yaml Outdated
helm.sh/chart: {{ include "velero.chart" . }}
spec:
backoffLimit: 3
backoffLimit: {{ default 3 $cleanUpCRDsJob.backoffLimit }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider remove the default setting at here as well.

{{- toYaml .Values.kubectl.extraVolumes | nindent 6 }}
{{- end }}
backoffLimit: 3
backoffLimit: {{ default 3 $labelNamespaceJob.backoffLimit }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider remove the default setting at here as well.

Comment thread charts/velero/Chart.yaml Outdated
description: A Helm chart for velero
name: velero
version: 11.3.2
version: 11.4.0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help rebase to the latest branch and bump version.

@jenting
Copy link
Copy Markdown
Collaborator

jenting commented Mar 2, 2026

@fabioaraujopt please
check the comments, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants