DependencyTrack / helm-charts

Helm Charts for Dependency-Track
https://dependencytrack.org
Apache License 2.0
13 stars 15 forks source link

YAML parse error when defining multi line annotations #56

Closed tvannahl closed 1 month ago

tvannahl commented 2 months ago

Versions

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