airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
16.1k stars 4.12k forks source link

Extra newlines in generated YAML for some secrets #47212

Open kubiani opened 2 weeks ago

kubiani commented 2 weeks ago

Helm Chart Version

1.1.0

What step the error happened?

On deploy

Relevant information

Some templates are generating newlines in the key/value YAML lines when they shouldn't be.

So far, have found:

# extra newline in secretKeyRef.key
- name: DATABASE_USER
  valueFrom:
    secretKeyRef:
      name: airbyte-config-secrets
      key:
        db-username
- name: DATABASE_PASSWORD
  valueFrom:
    secretKeyRef:
      name: "airbyte-config-secrets"
      key:
        db-password

# extra newline in secretKeyRef.name
- name: AWS_ACCESS_KEY_ID
  valueFrom:
    secretKeyRef:
      name:
  airbyte-config-secrets
  key: s3-access-key-id
- name: AWS_SECRET_ACCESS_KEY
  valueFrom:
    secretKeyRef:
      name:
  airbyte-config-secrets
  key: s3-secret-access-key

Relevant log output

Error: YAML parse error on airbyte/charts/server/templates/deployment.yaml: error converting YAML to JSON: yaml: line 251: could not find expected ':'
helm.go:86: 2024-10-21 17:41:19.0616751 -0500 CDT m=+0.506419701 [debug] error converting YAML to JSON: yaml: line 251: could not find expected ':'
YAML parse error on airbyte/charts/server/templates/deployment.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
        helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:144
helm.sh/helm/v3/pkg/releaseutil.SortManifests
        helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:104
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:316
main.runInstall
        helm.sh/helm/v3/cmd/helm/install.go:316
main.newTemplateCmd.func2
        helm.sh/helm/v3/cmd/helm/template.go:95
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.8.1/command.go:985
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.8.1/command.go:1117
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.8.1/command.go:1041
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:85
runtime.main
        runtime/proc.go:271
runtime.goexit
        runtime/asm_amd64.s:1695
kubiani commented 2 weeks ago

Relates to #46329