Distribution version of `yq` can lead to confusing issues when running the `setup.sh` script in `examples/multi-cluster`
I have a version of yq installed on my system:
~/emco-base/examples/multi-cluster$ pip3 list | grep yq
yq 2.12.2
Because it is on my system (and in the $PATH
), the install_yq
function from the examples/multi-cluster/setup.sh
script does not anything at all and the script will use that version already installed.
This leads to the following error in my case:
~/emco-base/examples/multi-cluster$ ./setup.sh -a collectd:cluster1:cluster2 -b operator:cluster2:cluster3 create
usage: yq [-h] [--yaml-output] [--yaml-roundtrip] [--width WIDTH]
[--indentless-lists] [--in-place] [--version]
[jq_filter] [files [files ...]]
yq: error: argument files: can't open '.Clusters[strenv(index)].Name = strenv(namestr)': [Errno 2] No such file or directory: '.Clusters[strenv(index)].Name = strenv(namestr)'
That error is rather confusing. It turns out to be related to the version of yq
that's not compatible with the setup.sh
script.