Initial commit
This commit is contained in:
20
entrypoint.sh
Normal file
20
entrypoint.sh
Normal 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
|
||||
Reference in New Issue
Block a user