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:
@ -174,6 +174,13 @@ def _repo(img: str) -> str:
|
||||
return img.rsplit(":", 1)[0] if ":" in seg else img
|
||||
|
||||
|
||||
def synced_health_path(path: str) -> str:
|
||||
"""경로 동기화 기본: healthPath = 경로 + '/healthz' (예: '/b21'→'/b21/healthz', '/'→'/healthz').
|
||||
콘솔 '경로 동기화'(기본 ON)와 정합 — 매니페스트에 health 를 명시하면 그 값을 그대로 쓴다."""
|
||||
base = (path or "/").strip().rstrip("/")
|
||||
return base + "/healthz"
|
||||
|
||||
|
||||
def deploy_workload(w: dict) -> tuple[str | None, bool]:
|
||||
image = w["image"].replace("${TAG}", TAG)
|
||||
ex = w.get("expose", {}) or {}
|
||||
@ -183,7 +190,8 @@ def deploy_workload(w: dict) -> tuple[str | None, bool]:
|
||||
"port": w.get("port"),
|
||||
"replicasDesired": w.get("replicas", 1),
|
||||
"cpuRequest": res.get("cpu", "25m"), "memRequest": res.get("mem", "96Mi"),
|
||||
"healthPath": w.get("health"),
|
||||
# health 미지정 시 경로와 동기화(경로+/healthz). 명시하면 그 값(커스텀).
|
||||
"healthPath": w.get("health") or synced_health_path(ex.get("path", "/")),
|
||||
"path": ex.get("path", "/"), "pathType": "Prefix", "rewritePrefix": bool(ex.get("rewrite", False)),
|
||||
}
|
||||
# 노출 도메인 = 워크로드 지정 host(s) + 환경 도메인(운영). 커스텀이 있으면 기본 도메인도 함께 노출.
|
||||
|
||||
Reference in New Issue
Block a user