Skip to content

YAML parse error when defining multi line annotations #56

@tvannahl

Description

@tvannahl

Versions

  • helm:
  • dependency-track chart: 0.5.0

Setup

The following override configuration yaml does trigger a conversion error:

frontend:
  service:
    annotations:
      foo: |
        bar
        naz
$ helm template -f override.yaml dependency-track --debug
install.go:218: [debug] Original chart version: ""
install.go:235: [debug] CHART PATH: /…/dependency-track

---
# Source: dependency-track/templates/frontend/service.yaml
---
apiVersion: v1
kind: Service
metadata:
  name: release-name-dependency-track-frontend
[…]
  annotations:
      foo: |
      bar
      naz
spec:
[…]
Error: YAML parse error on dependency-track/templates/frontend/service.yaml: error converting YAML to JSON: yaml: line 17: could not find expected ':'
helm.go:84: [debug] error converting YAML to JSON: yaml: line 17: could not find expected ':'
YAML parse error on dependency-track/templates/frontend/service.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:168
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
	helm.sh/helm/v3/pkg/action/install.go:304
main.runInstall
	helm.sh/helm/v3/cmd/helm/install.go:310
main.newTemplateCmd.func2
	helm.sh/helm/v3/cmd/helm/template.go:95
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.8.0/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.8.0/command.go:1115
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.8.0/command.go:1039
main.main
	helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
	runtime/proc.go:271
runtime.goexit
	runtime/asm_arm64.s:1222

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSomething isn't workinggood first issueGood for newcomersp2Non-critical bugs, and features that help organizations to identify and reduce risksize/SSmall effort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions