argo1/install-crds.sh

16 lines
409 B
Bash
Raw Normal View History

2023-04-22 18:40:31 +00:00
#!/bin/bash
cd "$(dirname "$0")"
(
set -e
eval "$(yq -o json . Chart.yaml | jq -r '.dependencies[0] | @sh "CHART=\(.name)\nVERSION=\(.version)\nREPO=\(.repository)"')"
helm template argocd-crds "$CHART" --repo "$REPO" --version "$VERSION" | yq 'select(.kind == "CustomResourceDefinition")' | kubectl apply -f -
)
RC=$?
if [ $RC -ne 0 ];then
1>&2 echo "exiting due to error"
exit $RC
fi