From 0707f726b869c3978644a81523ca6dda212cc48c Mon Sep 17 00:00:00 2001 From: dykim Date: Mon, 1 Jun 2026 11:01:16 +0900 Subject: [PATCH] Use deployment patch for session dev scaling --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 43cd3ec..e513db6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -150,7 +150,7 @@ spec: sh """ set -eux if [ "${IS_SESSION_JOB}" = "true" ]; then - kubectl -n ${APP_NS} scale deploy/${DEPLOY} --replicas=0 + kubectl -n ${APP_NS} patch deploy ${DEPLOY} --type=merge -p '{"spec":{"replicas":0}}' for i in \$(seq 1 150); do POD_COUNT=\$(kubectl -n ${APP_NS} get pod -l app=${DEPLOY} --no-headers 2>/dev/null | wc -l | tr -d ' ') [ "\${POD_COUNT}" = "0" ] && break @@ -165,7 +165,7 @@ spec: kubectl -n ${APP_NS} set image deploy/${DEPLOY} ${DEPLOY}=${REG}/${IMAGE}:${IMAGE_TAG} if [ "${IS_SESSION_JOB}" = "true" ]; then - kubectl -n ${APP_NS} scale deploy/${DEPLOY} --replicas=1 + kubectl -n ${APP_NS} patch deploy ${DEPLOY} --type=merge -p '{"spec":{"replicas":1}}' fi kubectl -n ${APP_NS} rollout status deploy/${DEPLOY} --timeout=300s