feat: initial commit

This commit is contained in:
Jonas Juselius
2024-01-30 16:03:23 +01:00
commit 0aeca24aa4
26 changed files with 1950 additions and 0 deletions
@@ -0,0 +1,25 @@
#!/bin/sh
export HOME=/tmp
echo $ARGOCD_APP_PARAMETERS | jq '.[] | select(.name == "helm-parameters") | .map' | yq -P -oy > parameters.yaml
cp parameters.yaml /tmp/$ARGOCD_APP_NAME-parameters.yaml
if [ -f chart -a $PARAM_CHART = "." ]; then
CHART=$(cat chart)
else
CHART=$PARAM_CHART
fi
helm template $PARAM_FLAGS \
-f values.yaml \
-f parameters.yaml \
-f $PARAM_ENV/values.yaml \
$ARGOCD_APP_NAME $CHART > ./base/_manifest.yaml
cp ./base/_manifest.yaml /tmp/$ARGOCD_APP_NAME-manifest.yaml
sed -i "$PARAM_REWRITE" ./base/_manifest.yaml
cp ./base/_manifest.yaml /tmp/$ARGOCD_APP_NAME-manifest-rw.yaml
kubectl kustomize $PARAM_ENV > /tmp/$ARGOCD_APP_NAME-manifest.yaml
cat /tmp/$ARGOCD_APP_NAME-manifest.yaml