feat(cli): 헬스체크 경로 동기화(경로+/healthz) — 콘솔 정합 · v0.31.0
deploy.py: health 미지정 시 healthPath=경로+/healthz 기본(명시=커스텀) ctl.py: set --path 시 커스텀 아니면 healthPath 동반 갱신 dev.py: 로컬 kind도 동일(readiness+liveness, 백엔드 정합) bin/yakcloud: VERSION 0.30.0 → 0.31.0
This commit is contained in:
@ -180,6 +180,12 @@ def cmd_scale(a) -> None:
|
||||
_apply_workload_patch(m, _cid(m), w, {"replicasDesired": int(a.replicas)}, "replicas=%s" % a.replicas)
|
||||
|
||||
|
||||
def synced_health_path(path: str) -> str:
|
||||
"""경로 동기화 기본: healthPath = 경로 + '/healthz' (콘솔 '경로 동기화'와 정합)."""
|
||||
base = (path or "/").strip().rstrip("/")
|
||||
return base + "/healthz"
|
||||
|
||||
|
||||
def cmd_set(a) -> None:
|
||||
m = load_manifest(); w = find_workload(m, a.workload)
|
||||
patch, changed = {}, []
|
||||
@ -199,6 +205,10 @@ def cmd_set(a) -> None:
|
||||
ex = w.get("expose", {}) or {}; w["expose"] = ex
|
||||
if a.path is not None:
|
||||
ex["path"] = a.path; patch["path"] = a.path; changed.append("path")
|
||||
# 헬스체크가 커스텀(매니페스트 health 명시)이 아니고 이번에 --health 도 안 주면
|
||||
# 경로와 동기화 — healthPath 도 경로+/healthz 로 갱신.
|
||||
if a.health is None and not w.get("health"):
|
||||
patch["healthPath"] = synced_health_path(a.path); changed.append("health(sync)")
|
||||
if a.rewrite is not None:
|
||||
rw = a.rewrite.lower() in ("1", "true", "yes", "on")
|
||||
ex["rewrite"] = rw; patch["rewritePrefix"] = rw; changed.append("rewrite")
|
||||
|
||||
Reference in New Issue
Block a user