Initial commit

This commit is contained in:
2024-12-07 15:44:48 +01:00
commit 0d3e37bfe0
4 changed files with 45 additions and 0 deletions

20
entrypoint.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
INPUT_DEPLOYMENT_NAME=$deploymentName
set -e
echo "Searching kubectl rights in env: KUBERNETES_BASE64_CONF"
if [[ -z "$KUBERNETES_BASE64_CONF" ]]; then
echo "No kubernetes config found."
echo "Encode it in base64 and place it in gitea secrets"
fi
echo "$KUBERNETES_BASE64_CONF" | base64 -d > "/root/.kube/config"
KUBECTL_OPTIONS+=("rollout" "restart" "deployment/${INPUT_DEPLOYMENT_NAME}")
# shellcheck disable=SC2145
echo "Running kubectl with options: ${KUBECTL_OPTIONS[@]}"
kubectl ${KUBECTL_OPTIONS[@]}
exit 0