-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
PR #313 added a template function to DRY the port definitions inside the templates.
However when using custom NetPols via .Values.networkPolicy.ingressRules, while omiting ports, templating the chart will fail, as the template scope has been changed by the range function.
Error: Failed to render chart: exit status 1: Error: template: redis-ha/templates/redis-ha-network-policy.yaml:65:10: executing "redis-ha/templates/redis-ha-network-policy.yaml" at <include "redis-ports" .>: error calling include: template: redis-ha/templates/_helpers.tpl:138:22: executing "redis-ports" at <.Values.redis.port>: nil pointer evaluating interface {}.redis
To Reproduce
- Set values
# values.yaml
networkPolicy:
enabled: true
ingressRules:
- selectors:
- namespaceSelector:
matchLabels:
name: 'my-namespace'- Template chart
Expected behavior
Templating the chart does not fail with an error.
Additional context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working