Deploy achievement-safe Factorio 2.0.77 with strict placement, monitoring and limited CD
This commit is contained in:
commit
d1978abb05
29 files changed
+1459
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
root=$(cd -- "$(dirname -- "$0")" && pwd)
|
||||
if [[ ${FACTORIO_CI:-false} != true ]]; then
|
||||
[[ $(kubectl config current-context) == kubernetes-admin@kubernetes ]] || { echo 'Wrong Kubernetes context' >&2; exit 1; }
|
||||
fi
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
"$root/render.sh" > "$work/rendered.yaml"
|
||||
# The reconciler owns live placement. An image/config update must not reset failover.
|
||||
kubectl -n factorio get deployment factorio --ignore-not-found -o json > "$work/live.json"
|
||||
python3 "$root/scripts/prepare-deploy.py" "$work/rendered.yaml" "$work/live.json" > "$work/apply.yaml"
|
||||
kubectl apply --dry-run=server -f "$work/apply.yaml"
|
||||
kubectl apply -f "$work/apply.yaml"
|
||||
if ! kubectl -n factorio rollout status deployment/factorio --timeout=1800s; then
|
||||
kubectl -n factorio get deployment factorio -o yaml
|
||||
kubectl -n factorio get pods -o wide
|
||||
kubectl -n factorio get events --sort-by=.lastTimestamp
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user