caibirdme opened a new issue, #1094:
URL: https://github.com/apache/apisix-ingress-controller/issues/1094
### Issue description
when dry-run to test, it reported error:
`helm install --debug --dry-run -f ./apisix-dashboard/custom-values.yaml
apisix-dashboard ./ap
isix-dashboard -n ingress-apisix`
```
Error: INSTALLATION FAILED: YAML parse error on
apisix-dashboard/templates/ingress.yaml: error converting YAML to JSON: yaml:
line 21: mapping values are not allowed in this context
helm.go:84: [debug] error converting YAML to JSON: yaml: line 21: mapping
values are not allowed in this context
YAML parse error on apisix-dashboard/templates/ingress.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
helm.sh/helm/v3/pkg/action/action.go:165
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
helm.sh/helm/v3/pkg/action/install.go:259
main.runInstall
helm.sh/helm/v3/cmd/helm/install.go:264
main.newInstallCmd.func2
helm.sh/helm/v3/cmd/helm/install.go:125
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
runtime/proc.go:255
runtime.goexit
runtime/asm_amd64.s:1581
INSTALLATION FAILED
main.newInstallCmd.func2
helm.sh/helm/v3/cmd/helm/install.go:127
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
runtime/proc.go:255
runtime.goexit
runtime/asm_amd64.s:1581
```
### Environment
- your apisix-ingress-controller version (output of
apisix-ingress-controller version --long): apisix/[email protected]
- your Kubernetes cluster version (output of kubectl version): 1.20.4
- if you run apisix-ingress-controller in Bare-metal environment, also show
your OS version (uname -a): centos7
### Minimal test code / Steps to reproduce
custom-values.yaml
```yaml
resources:
requests:
cpu: 1
memory: 2Gi
config:
conf:
etcd:
endpoints:
- http://xxx:2379
username: ""
password: ""
ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
hosts:
- host: example.com
paths:
- /dashboard(/|$)(.*)
```
run: `helm install --debug --dry-run -f
./apisix-dashboard/custom-values.yaml apisix-dashboard ./ap
isix-dashboard -n ingress-apisix`
### Actual result
Error: INSTALLATION FAILED: YAML parse error on
apisix-dashboard/templates/ingress.yaml: error converting YAML to JSON: yaml:
line 21: mapping values are not allowed in this context
helm.go:84: [debug] error converting YAML to JSON: yaml: line 21: mapping
values are not allowed in this context
YAML parse error on apisix-dashboard/templates/ingress.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
helm.sh/helm/v3/pkg/action/action.go:165
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
helm.sh/helm/v3/pkg/action/install.go:259
main.runInstall
helm.sh/helm/v3/cmd/helm/install.go:264
main.newInstallCmd.func2
helm.sh/helm/v3/cmd/helm/install.go:125
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
runtime/proc.go:255
runtime.goexit
runtime/asm_amd64.s:1581
INSTALLATION FAILED
main.newInstallCmd.func2
helm.sh/helm/v3/cmd/helm/install.go:127
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
runtime/proc.go:255
runtime.goexit
runtime/asm_amd64.s:1581
### Error log
same above
### Expected result
no error
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]