Closed nkaravias closed 3 years ago
@nkaravias Ran into this issue while trying to install via the helm terraform provider (0.10.x which is on helm 2). Downloading the chart locally and making the changes you mentioned above fixed the issue. I've tried see if there are any compatibility issues where helm 2 can't leverage composite statements and haven't found any.
Any idea why the composite if block is causing this problem?
Any idea why the composite if block is causing this problem?
Go's text/template syntax does not support this style. More recent versions of Go detect this and now report back an error. See https://golang.org/doc/go1.14 for more details.
Switching to the correct if and ( ... ) ( ... )
will work with both Helm 2 and Helm 3. if ( ... ) and ( ... )
never worked in the first place.
When attempting to install the forseti chart with default values there seems to be a templating issue. This seems to be related to https://github.com/helm/helm/issues/7711, so the answer might simply need to be a change in some of the templates and a new release.
Following the instructions from: https://github.com/forseti-security/helm-charts/tree/master/charts/forseti-security, installing without tiller:
helm fetch forseti-security/forseti-security --version=2.2.0
The following error is thrown:
Error: template: forseti-security/templates/orchestrator/network-policies/default-deny-ingress-egress.yaml:15:6: executing "forseti-security/templates/orchestrator/network-policies/default-deny-ingress-egress.yaml" at <(.Values.networkPolicy.enabled) and (.Values.orchestrator.enabled)>: can't give argument to non-function .Values.networkPolicy.enabled helm.go:81: [debug] template: forseti-security/templates/orchestrator/network-policies/default-deny-ingress-egress.yaml:15:6: executing "forseti-security/templates/orchestrator/network-policies/default-deny-ingress-egress.yaml" at <(.Values.networkPolicy.enabled) and (.Values.orchestrator.enabled)>: can't give argument to non-function .Values.networkPolicy.enabled
{{ if (.Values.networkPolicy.enabled) and (.Values.orchestrator.enabled) }}
{{ if .Values.networkPolicy.enabled }} {{ if .Values.orchestrator.enabled }}