stefanprodan / hrval-action

Flux Helm Release validation GitHub action
Apache License 2.0
60 stars 44 forks source link

fix: allow YAML anchors to be interpreted in the values #49

Closed chrisminton closed 3 years ago

chrisminton commented 3 years ago

In the case where YAML anchors and aliases are used in values.yaml e.g.:

spec:
  releaseName: istio-operator
  chart:
    git: https://github.com/istio/istio.git
    ref: &version 1.7.5
    path: manifests/charts/istio-operator/
  values:
    hub: docker.io/istio
    tag: *version

one will see the following error since the values are not interpreted.

Error: failed to parse /tmp/tmp.DBpoGP/values.yaml:
error converting YAML to JSON: yaml: unknown anchor 'version' referenced

yq allows for this, and this update correctly interprets the values: yq r -X istio-operator.yaml spec.values gives

hub: docker.io/istio
tag: 1.7.5