Files
manifests/argo/kustomize-helm-with-rewrite/get-values.sh
T
2024-01-30 16:03:23 +01:00

20 lines
393 B
Bash

#!/bin/sh
# cat << EOF
# [{
# "name": "values",
# "title": "Values",
# "collectionType": "map",
# "map": { "replicaCount": "1" }
# }]
# EOF
yq e -o=p values.yaml | jq --slurp --raw-input '
[{
name: "helm-parameters",
title: "Helm Parameters",
collectionType: "map",
map: split("\n") | map(capture("(?<key>.*) = (?<value>.*)")) | from_entries
}]'