wip: argo manifest cmp
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f values.yaml ]; then
|
||||
VALUES="values.yaml"
|
||||
elif [ -f values-chart.yaml ]; then
|
||||
VALUES="values-chart.yaml"
|
||||
elif [ -f chart/values.yaml ]; then
|
||||
VALUES="chart/values.yaml"
|
||||
else
|
||||
cat << EOF
|
||||
[{
|
||||
"name": "helm-parameters",
|
||||
"title": "Helm Parameters",
|
||||
"collectionType": "map",
|
||||
"map": { "replicaCount": "1" }
|
||||
}]
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
yq e -o=p $VALUES | jq --slurp --raw-input '
|
||||
[{
|
||||
name: "helm-parameters",
|
||||
title: "Helm Parameters",
|
||||
collectionType: "map",
|
||||
map: split("\n") | map(capture("(?<key>.*) = (?<value>.*)")) | from_entries
|
||||
}]'
|
||||
|
||||
Reference in New Issue
Block a user