fix: nil pointer when evaluating when cronjob.enabled=true#872
Merged
varet80 merged 2 commits intoJul 23, 2026
Merged
Conversation
sapslaj
force-pushed
the
fix-nil-pointer-evaluating-with-cronjob-enabled
branch
2 times, most recently
from
July 22, 2026 22:02
256e381 to
3ac21d1
Compare
The `if` block checking if Redis is enabled needs to be anchored
correctly since we are inside a `with` block (`with
.Values.cronjob.sidecar`). Otherwise you get an error:
```
Error: nextcloud/templates/deployment.yaml:274:26
executing "nextcloud/templates/deployment.yaml" at <.Values.redis.enabled>:
nil pointer evaluating interface {}.redis
```
Signed-off-by: sapslaj <saps.laj@gmail.com>
Signed-off-by: sapslaj <saps.laj@gmail.com>
sapslaj
force-pushed
the
fix-nil-pointer-evaluating-with-cronjob-enabled
branch
from
July 22, 2026 22:03
3ac21d1 to
5b2bd61
Compare
Collaborator
|
LGTM |
varet80
approved these changes
Jul 23, 2026
varet80
enabled auto-merge
July 23, 2026 02:58
varet80
disabled auto-merge
July 23, 2026 02:58
varet80
enabled auto-merge
July 23, 2026 02:58
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
The
ifblock checking if Redis is enabled needs to be anchored correctly since we are inside awithblock (with .Values.cronjob.sidecar). Otherwise you get an error:Benefits
Makes the chart renderable with
--set cronjob.enabled=true.Possible drawbacks
I believe this is the only occurrence but I might have missed an
{{- if .Values.redis.enabled }}that needs to be{{- if $.Values.redis.enabled }}instead in some branch. I went through all the places where it was introduced in #752 but might have missed others.Applicable issues
Additional information
Checklist
Chart.yamlaccording to semver.