Skip to content

yq does not recognize helm template yaml key: {{...}}:{{...}} #2270

Open
@amir-hoseyn77

Description

@amir-hoseyn77

Describe the bug
I have a "helm" template whose line contains key: {{aaa}}:{{bbb}} that causes a parsing error not found key! The {{aaa}}:{{bbb}} must be evaluated as value for key but yq thinks that {{aaa}} is a new key so must be in a new line!

I have checked this file with some YAML validator websites and they have trouble with that line.

Version of yq: v4.44.6
Operating system: Ubuntu 24.04
Installed via: wget binary release

Input Yaml
data1.yml:

tracing:
  enabled: {{ .Values.jaeger.enabled }}
  exporter:
    endpoint: {{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-ac-a1pms-ppnt.exporter-port" . }}

Command
A simple eval even .

yq eval '.tracing.enabled' data1.yaml

Actual behavior
Error:

Error: bad file 'data1.yaml': yaml: line 3: did not find expected key

Expected behavior

{{ .Values.jaeger.enabled }}

Additional context
I have installed yq with wget. It seems snap-installed yq has some inconsistency with root privilege.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions