argocd/argo1/install-crds.sh
2023-04-23 11:19:35 -05:00

16 lines
409 B
Bash

#!/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