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
|
2022-01-24 11:05:54 +00:00
|
|
|
yq eval -Pi '.spec.source.helm.values |= strload("_values.yaml")' $YAML
|
2021-12-21 15:05:08 +00:00
|
|
|
|
|
|
|
rm -f _values.yaml
|