KubeZero/releases/v1.22/migrate_argo.sh

18 lines
294 B
Bash
Raw Normal View History

2021-12-21 15:05:08 +00:00
#!/bin/bash -x
YAML=$1
# Convert keys
yq eval -i '
2022-04-13 16:02:14 +00:00
.spec.source.targetRevision="1.22.8-2"
' $YAML
2021-12-21 15:05:08 +00:00
# Extract values
yq eval '.spec.source.helm.values' $1 > _values.yaml
# merge _values.yaml back
yq eval -Pi '.spec.source.helm.values |= strload("_values.yaml")' $YAML
2021-12-21 15:05:08 +00:00
rm -f _values.yaml