bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.05k stars 9.22k forks source link

Use Helm high-availability architecture, get error from Ingress #5691

Closed latituder closed 3 years ago

latituder commented 3 years ago

Description

K8s version: 1.20 HELM chart version: 2.0.3 set architecture= high-availability

get error from Helm when generate ingress yaml; however, if set architecture to standalone, then the error doesn't appear get error:

Error: YAML parse error on influxdb/templates/ingress.yaml: error converting YAML to JSON: yaml: line 16: mapping values are not allowed in this context
helm.go:81: [debug] error converting YAML to JSON: yaml: line 16: mapping values are not allowed in this context
YAML parse error on influxdb/templates/ingress.yaml

Steps to reproduce the issue:

helm install --namespace=influx-v2-test --wait --set-string architecture=high-availability --set-string networkPolicy.enabled=true --set-string persistence.storageClass=nfs-ccloud-rwx --set-string persistence.accessMode=haas-cpu-memory-moni-influx-v2 --set-string persistence.size=16Gi --set-string auth.user.bucket=BUCKET_haas-cpu-memory-moni-influx-v2,auth.user.org=ORG_haas-cpu-memory-moni-influx-v2 --set-string auth.admin.username=admin,auth.admin.password=M7i6S11xnGbwS86AHjtv --set-string auth.writeUser.username=influx_rw,auth.writeUser.password=XaoNf16cH5dExch6caDb --set-string auth.readUser.username=influx_r,auth.readUser.password=t985puZYhZ7OZDi8MQ1A --set-string influxdb.replicaCount=1,relay.replicaCount=1 --set-string resources.requests.cpu=0.1,resources.requests.memory=256Mi --set-string resources.limits.memory=8Gi,resources.limits.cpu=4 --set-string relay.resources.requests.cpu=0.1,relay.resources.requests.memory=256Mi --set-string relay.resources.limits.memory=8Gi,relay.resources.limits.cpu=4 --set-string ingress.enabled=true --set-string ingress.pathType=ImplementationSpecific --set-string ingress.hostname=haas-cpu-memory-moni-influx-v2.qod.cxs.only.sap,ingress.tls=true haas-cpu-memory-moni-influx-v2 ./influxdb --dry-run --debug

Describe the results you received:

Error: YAML parse error on influxdb/templates/ingress.yaml: error converting YAML to JSON: yaml: line 16: mapping values are not allowed in this context
helm.go:81: [debug] error converting YAML to JSON: yaml: line 16: mapping values are not allowed in this context
YAML parse error on influxdb/templates/ingress.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
        /home/circleci/helm.sh/helm/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
        /home/circleci/helm.sh/helm/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
        /home/circleci/helm.sh/helm/pkg/action/action.go:165
helm.sh/helm/v3/pkg/action.(*Install).Run
        /home/circleci/helm.sh/helm/pkg/action/install.go:239
main.runInstall
        /home/circleci/helm.sh/helm/cmd/helm/install.go:241
main.newInstallCmd.func2
        /home/circleci/helm.sh/helm/cmd/helm/install.go:120
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
main.main
        /home/circleci/helm.sh/helm/cmd/helm/helm.go:80
runtime.main
        /usr/local/go/src/runtime/proc.go:203
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1373

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

andresbono commented 3 years ago

Hi @latituder, thanks for raising this issue, it can be reproduced with:

$ helm template --set-string architecture=high-availability --set-string ingress.enabled=true . --debug -s templates/ingress.yaml
andresbono commented 3 years ago

@latituder, #5703 should fix the issue. Thanks for reporting!