Compare commits

...

1 Commits

Author SHA1 Message Date
Sergey Antropoff 65af983dea Raise deploy rollout timeout to 1200s and set images in one step.
Avoid double ReplicaSet churn and ImagePullBackOff races during Hub pulls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 00:56:46 +03:00
3 changed files with 11 additions and 11 deletions
Vendored
+7 -9
View File
@@ -135,7 +135,7 @@ pipeline {
chmod +x /usr/local/bin/kubectl
fi
kubectl version --client --short || kubectl version --client
kubectl version --client || true
if ! kubectl -n "$HELM_NAMESPACE" get deploy "$DEPLOYMENT_NAME" >/dev/null 2>&1; then
echo "Deployment ${HELM_NAMESPACE}/${DEPLOYMENT_NAME} not found." >&2
@@ -146,20 +146,18 @@ pipeline {
echo "Rolling ${DOCKERHUB_IMAGE}:${IMAGE_VERSION} → ${HELM_NAMESPACE}/${DEPLOYMENT_NAME}"
echo "Public URL: https://${INGRESS_HOST}/"
# Main container always; migrate initContainer when present.
kubectl -n "$HELM_NAMESPACE" set image \
"deployment/${DEPLOYMENT_NAME}" \
"simulator=${DOCKERHUB_IMAGE}:${IMAGE_VERSION}"
# One set-image avoids double ReplicaSet churn; migrate when present.
SET_ARGS=("simulator=${DOCKERHUB_IMAGE}:${IMAGE_VERSION}")
if kubectl -n "$HELM_NAMESPACE" get deploy "$DEPLOYMENT_NAME" \
-o jsonpath='{.spec.template.spec.initContainers[*].name}' \
| tr ' ' '\n' | grep -qx migrate; then
kubectl -n "$HELM_NAMESPACE" set image \
"deployment/${DEPLOYMENT_NAME}" \
"migrate=${DOCKERHUB_IMAGE}:${IMAGE_VERSION}"
SET_ARGS+=("migrate=${DOCKERHUB_IMAGE}:${IMAGE_VERSION}")
fi
kubectl -n "$HELM_NAMESPACE" set image \
"deployment/${DEPLOYMENT_NAME}" "${SET_ARGS[@]}"
kubectl -n "$HELM_NAMESPACE" rollout status \
"deployment/${DEPLOYMENT_NAME}" --timeout=300s
"deployment/${DEPLOYMENT_NAME}" --timeout=1200s
kubectl -n "$HELM_NAMESPACE" get deploy,po,ing -o wide
'''
}
+2 -1
View File
@@ -15,7 +15,8 @@ Single [`Jenkinsfile`](../Jenkinsfile) on `main` / `master`:
1. **Build & push** (agent `docker` / DinD) — multi-arch `linux/amd64,linux/arm64`
to Harbor and Docker Hub with tags **`:{VERSION}`** and **`:latest`** only.
2. **Deploy**`kubectl set image` on `simulators/simulators-proxmox` (main
container `simulator` + initContainer `migrate`), then rollout status.
container `simulator` + initContainer `migrate`), then rollout status
(`--timeout=1200s`).
First cluster install (Ingress, Postgres, secrets) is **not** this job — use
`make addon-simulators` in DevOpsTools/K3S (`simulators_proxmox_host:
+2 -1
View File
@@ -15,7 +15,8 @@ Jenkins версию **не** поднимает — собирает то, чт
1. **Build & push** (agent `docker` / DinD) — multi-arch `linux/amd64,linux/arm64`
в Harbor и Docker Hub, теги только **`:{VERSION}`** и **`:latest`**.
2. **Deploy**`kubectl set image` для `simulators/simulators-proxmox`
(контейнер `simulator` + initContainer `migrate`), затем rollout status.
(контейнер `simulator` + initContainer `migrate`), затем rollout status
(`--timeout=1200s`).
Первый install в кластере (Ingress, Postgres, секреты) — **не** этот job, а
`make addon-simulators` в DevOpsTools/K3S (`simulators_proxmox_host: