chore(base-cluster/dependencies)!: update helm release velero to v11 - abandoned#1827
chore(base-cluster/dependencies)!: update helm release velero to v11 - abandoned#1827renovate[bot] wants to merge 3 commits intomainfrom
Conversation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
0a20990 to
e653c75
Compare
a4909ea to
5a9bdc9
Compare
56d64b1 to
99347d4
Compare
ca8d962 to
2a41bd7
Compare
043d6b9 to
354f307
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
Autoclosing SkippedThis PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@charts/base-cluster/README.md.gotmpl`:
- Around line 438-440: The README currently references the wrong values key
`backup.velero.defaultLocation`; update the documentation text to point to the
actual chart values key `.backup.provider.velero.defaultLocation` (and any
similar occurrences) so users set the correct path when creating a new bucket
and configuring Velero; search for `backup.velero.defaultLocation` in the README
and replace it with `.backup.provider.velero.defaultLocation` and verify
examples and backticks use the exact dotted path.
In `@charts/base-cluster/templates/backup/velero/velero.yaml`:
- Around line 2-6: The template unconditionally accesses (lookup ...).items
which fails when lookup returns an empty map; guard that access by first
capturing the lookup result and checking it has items before ranging. For
example, assign the lookup to a variable (e.g., $repos := lookup "velero.io/v1"
"BackupRepository" "backup" "") and then wrap the range in a guard like {{- with
$repos.items }} ... {{- end }} (or check that $repos and $repos.items are
non-empty) before iterating and inspecting repo.spec.repositoryType and calling
fail/printf with repo.metadata.name.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5d632ce1-6aed-4dca-9b27-7fe60568caa7
📒 Files selected for processing (4)
charts/base-cluster/README.md.gotmplcharts/base-cluster/templates/backup/velero/velero.yamlcharts/base-cluster/templates/kyverno/policies/kyverno-base-policies/kyverno-policies.yamlcharts/base-cluster/values.yaml
| {{- range $index, $repo := (lookup "velero.io/v1" "BackupRepository" "backup" "").items}} | ||
| {{- if eq $repo.spec.repositoryType "restic" }} | ||
| {{- fail (printf "The Backuprepository '%s' is of unsupported type restic" $repo.metadata.name) }} | ||
| {{- end }} | ||
| {{- end }} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's examine the actual file to see the code at lines 2-6
cat -n charts/base-cluster/templates/backup/velero/velero.yaml | head -20Repository: teutonet/teutonet-helm-charts
Length of output: 963
🏁 Script executed:
# Also check if there's context around this - let's see a wider range
wc -l charts/base-cluster/templates/backup/velero/velero.yamlRepository: teutonet/teutonet-helm-charts
Length of output: 133
🏁 Script executed:
# Search for similar lookup() patterns in the repository to see how they're handled
rg "lookup\s*\(" charts/ -A 2 -B 1 | head -100Repository: teutonet/teutonet-helm-charts
Length of output: 55
🌐 Web query:
Helm template lookup function null empty handling .items
💡 Result:
In Helm templates, the lookup function returns an empty map/dict {} when no matching resources are found in the cluster (or during helm template/--dry-run without cluster access). This empty map does not have an .items field. Accessing .items on an empty lookup result causes a "nil pointer" or similar template error because .items is nil/undefined. To safely handle this: 1. Check if lookup returned a non-empty result before accessing .items: {{- $lookupResult := lookup "v1" "Service" "mynamespace" "" }} {{- if $lookupResult }} {{- range $service := $lookupResult.items }} # process $service {{- end }} {{- end }} 2. For list lookups (empty name ""), check length: {{- if eq (len (lookup "v1" "Service" "mynamespace" "")) 0 }} # No services found {{- else }} # Services exist {{- end }} The official Helm docs confirm: "When lookup returns a list of objects, it is possible to access the object list via the items field" but "When no object is found, an empty value is returned." The Go template source code explicitly returns map[string]interface{}{} (empty map) on not found, enabling if not (lookup ...) checks. Always wrap .items access in if $lookupResult to avoid errors.
Citations:
- 1: https://helm.sh/docs/chart_template_guide/functions_and_pipelines
- 2: https://github.com/helm/helm/blob/340b06d8/pkg/engine/lookup_func.go
- 3: https://stackoverflow.com/questions/71156026/helm-lookup-always-empty
- 4: https://oneuptime.com/blog/post/2026-01-17-helm-lookup-function-dynamic-discovery/view
🏁 Script executed:
# Check if there's any error handling or similar patterns in the templates
rg "if.*lookup\|if.*\$" charts/base-cluster/templates/ -A 2 -B 1 | head -50Repository: teutonet/teutonet-helm-charts
Length of output: 55
🏁 Script executed:
# Look for any Helm documentation or comments about lookup in the codebase
rg -i "lookup.*backuprepository\|backuprepository.*lookup" charts/Repository: teutonet/teutonet-helm-charts
Length of output: 55
🏁 Script executed:
# Check the git history to understand when this was added and why
git log --oneline -n 20 -- charts/base-cluster/templates/backup/velero/velero.yamlRepository: teutonet/teutonet-helm-charts
Length of output: 150
🏁 Script executed:
# Let's check the full context of how this template is used - are BackupRepositories always present?
cat -n charts/base-cluster/templates/backup/velero/velero.yaml | sed -n '1,30p'Repository: teutonet/teutonet-helm-charts
Length of output: 1212
🏁 Script executed:
# Check if there's any documentation or values file that explains the expected state
find charts/base-cluster -name "*.md" -o -name "*values*" | xargs rg -l "BackupRepository\|velero" 2>/dev/nullRepository: teutonet/teutonet-helm-charts
Length of output: 57
🏁 Script executed:
# Check the values defaults
fd "values" charts/base-cluster/ --type f | head -5Repository: teutonet/teutonet-helm-charts
Length of output: 307
🏁 Script executed:
# Check if there's documentation about the velero setup and expected state
cat -n charts/base-cluster/templates/backup/velero/README.md 2>/dev/null || echo "No README found"Repository: teutonet/teutonet-helm-charts
Length of output: 89
🏁 Script executed:
# Look at the chart's values.yaml to understand defaults
cat charts/base-cluster/values.yaml | grep -A 20 "backup:" | head -30Repository: teutonet/teutonet-helm-charts
Length of output: 881
🏁 Script executed:
# Verify if this pattern is consistently an issue - check when lookup is used without guarding
rg "lookup.*\(" charts/ -A 1 | grep -E "lookup|\.items" | head -20Repository: teutonet/teutonet-helm-charts
Length of output: 851
Guard the lookup result before accessing .items.
The lookup() function returns an empty map when the BackupRepository resource is not found (e.g., during initial deployment or when running helm template/dry-run without cluster access). Accessing .items on this empty result causes template rendering to fail. The condition wrapping this block checks only if Velero is enabled, not whether BackupRepository resources exist.
🔧 Proposed fix
{{- if (.Values.backup.provider).velero }}
-{{- range $index, $repo := (lookup "velero.io/v1" "BackupRepository" "backup" "").items}}
- {{- if eq $repo.spec.repositoryType "restic" }}
- {{- fail (printf "The Backuprepository '%s' is of unsupported type restic" $repo.metadata.name) }}
- {{- end }}
-{{- end }}
+{{- $repos := lookup "velero.io/v1" "BackupRepository" "backup" "" -}}
+{{- if $repos }}
+{{- range $repo := $repos.items }}
+ {{- if eq $repo.spec.repositoryType "restic" }}
+ {{- fail (printf "The BackupRepository '%s' is of unsupported type restic" $repo.metadata.name) }}
+ {{- end }}
+{{- end }}
+{{- end }}
apiVersion: helm.toolkit.fluxcd.io/v2🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@charts/base-cluster/templates/backup/velero/velero.yaml` around lines 2 - 6,
The template unconditionally accesses (lookup ...).items which fails when lookup
returns an empty map; guard that access by first capturing the lookup result and
checking it has items before ranging. For example, assign the lookup to a
variable (e.g., $repos := lookup "velero.io/v1" "BackupRepository" "backup" "")
and then wrap the range in a guard like {{- with $repos.items }} ... {{- end }}
(or check that $repos and $repos.items are non-empty) before iterating and
inspecting repo.spec.repositoryType and calling fail/printf with
repo.metadata.name.
| @@ -1,4 +1,9 @@ | |||
| {{- if (.Values.backup.provider).velero }} | |||
| {{- range $index, $repo := (lookup "velero.io/v1" "BackupRepository" "backup" "").items}} | |||
| {{- if (.Values.backup.provider).velero }} | ||
| {{- range $index, $repo := (lookup "velero.io/v1" "BackupRepository" "backup" "").items}} | ||
| {{- if eq $repo.spec.repositoryType "restic" }} | ||
| {{- fail (printf "The Backuprepository '%s' is of unsupported type restic" $repo.metadata.name) }} |
There was a problem hiding this comment.
Aren't they namespaced? If yes you should also print out the namespace
| seccompProfile: | ||
| type: RuntimeDefault | ||
| extraVolumeMounts: | ||
| - mountPath: /udmrepo |
| url: https://vmware-tanzu.github.io/helm-charts | ||
| charts: | ||
| velero: 7.2.2 | ||
| velero: 11.3.2 |
There was a problem hiding this comment.
Wasn't there 12 already released?
This PR contains the following updates:
7.2.2→11.3.2Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
vmware-tanzu/helm-charts (velero)
v11.3.2Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-11.3.1...velero-11.3.2
v11.3.1Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-11.2.0...velero-11.3.1
v11.2.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-11.1.1...velero-11.2.0
v11.1.1Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-11.1.0...velero-11.1.1
v11.1.0Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-11.0.0...velero-11.1.0
v11.0.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-10.1.3...velero-11.0.0
v10.1.3Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-10.1.2...velero-10.1.3
v10.1.2Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-10.1.1...velero-10.1.2
v10.1.1Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.1.0...velero-10.1.1
v10.1.0Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.13...velero-10.1.0
v10.0.13Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.12...velero-10.0.13
v10.0.12Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.11...velero-10.0.12
v10.0.11Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.10...velero-10.0.11
v10.0.10Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.9...velero-10.0.10
v10.0.9Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.8...velero-10.0.9
v10.0.8Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.7...velero-10.0.8
v10.0.7Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.6...velero-10.0.7
v10.0.6Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.5...velero-10.0.6
v10.0.5Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.4...velero-10.0.5
v10.0.4Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.3...velero-10.0.4
v10.0.3Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.2...velero-10.0.3
v10.0.2Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.1...velero-10.0.2
v10.0.1Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-10.0.0...velero-10.0.1
v10.0.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-9.2.0...velero-10.0.0
v9.2.0Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-9.1.3...velero-9.2.0
v9.1.3Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-9.1.2...velero-9.1.3
v9.1.2Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-9.1.1...velero-9.1.2
v9.1.1Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-9.1.0...velero-9.1.1
v9.1.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-9.0.4...velero-9.1.0
v9.0.4Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-9.0.3...velero-9.0.4
v9.0.3Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-9.0.2...velero-9.0.3
v9.0.2Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-9.0.1...velero-9.0.2
v9.0.1Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-9.0.0...velero-9.0.1
v9.0.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.7.2...velero-9.0.0
v8.7.2Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.7.1...velero-8.7.2
v8.7.1Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.7.0...velero-8.7.1
v8.7.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.6.0...velero-8.7.0
v8.6.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.5.0...velero-8.6.0
v8.5.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.4.0...velero-8.5.0
v8.4.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.3.0...velero-8.4.0
v8.3.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.2.0...velero-8.3.0
v8.2.0Compare Source
A Helm chart for velero
What's Changed
New Contributors
Full Changelog: vmware-tanzu/helm-charts@velero-8.1.0...velero-8.2.0
v8.1.0Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-8.0.0...velero-8.1.0
v8.0.0Compare Source
A Helm chart for velero
What's Changed
Full Changelog: vmware-tanzu/helm-charts@velero-7.2.2...velero-8.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
Summary by CodeRabbit
Release Notes
Documentation
New Features
Chores