Error converting YAML to JSON: did not find expected key – error in pipeline

You can see the mismatched indentation under regcred:

      - name: regcred
      # <-- indented "-"
      #VVV not indented
        runAsNonRoot: true

which, as luck would have it, is the 38th line in the output YAML

$ helm template --debug my-chart . 2>&1| sed -e '1,/^apiVersion:/d' | sed -ne 38p

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top