From 25176159133ebb4d906b45ba62932568268d7660 Mon Sep 17 00:00:00 2001 From: yakenator Date: Fri, 28 Aug 2026 05:19:31 +0900 Subject: [PATCH] =?UTF-8?q?cli=20v0.11.1:=20environments=20env=20=ED=81=B4?= =?UTF-8?q?=EB=9F=AC=EC=8A=A4=ED=84=B0=EA=B0=80=20=EC=A0=80=EC=9E=A5/?= =?UTF-8?q?=EC=A0=84=EC=97=AD=20YAKCLOUD=5FCLUSTER=20=EB=B3=B4=EB=8B=A4=20?= =?UTF-8?q?=EC=9A=B0=EC=84=A0(=ED=8F=B4=EB=B0=B1=20=EA=B0=95=EB=93=B1)=20?= =?UTF-8?q?=E2=80=94=20dev/prod=20=ED=95=B4=EC=84=9D=20=EC=A0=95=ED=99=95?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/yakcloud | 2 +- scripts/yakcloud_ctl.py | 5 +++-- scripts/yakcloud_deploy.py | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/yakcloud b/bin/yakcloud index 432b4fa..7110bff 100755 --- a/bin/yakcloud +++ b/bin/yakcloud @@ -14,7 +14,7 @@ set -uo pipefail # -e 미사용: 'test && action' 관용구가 값 없을 때 REPO="${YAKCLOUD_STARTER_REPO:-https://gitea.yakenator.io/yakenator/yakcloud-starter}" BRANCH="${YAKCLOUD_STARTER_BRANCH:-main}" -VERSION="0.11.0" +VERSION="0.11.1" CONFIG_DIR="${YAKCLOUD_CONFIG_DIR:-$HOME/.config/yakcloud}" CONFIG_FILE="$CONFIG_DIR/config" diff --git a/scripts/yakcloud_ctl.py b/scripts/yakcloud_ctl.py index dd91a0e..9f0eee3 100644 --- a/scripts/yakcloud_ctl.py +++ b/scripts/yakcloud_ctl.py @@ -63,8 +63,9 @@ def cluster_ref(m: dict) -> str: # 조회/설정은 기본 개발 환경 클러스터 기준. environments..cluster → 하위호환 cluster:. env = os.environ.get("YAKCLOUD_ENV", "dev") envs = m.get("environments") or {} - ref = (os.environ.get("YAKCLOUD_CLUSTER") - or (envs.get(env) or {}).get("cluster") or m.get("cluster")) + # env 클러스터 최우선(저장/전역 YAKCLOUD_CLUSTER 는 하위호환 폴백). + ref = ((envs.get(env) or {}).get("cluster") + or os.environ.get("YAKCLOUD_CLUSTER") or m.get("cluster")) if not ref: sys.exit(" ✗ 대상 클러스터 미지정 — yakcloud.yaml 의 environments.%s.cluster (또는 YAKCLOUD_CLUSTER)" % env) return ref diff --git a/scripts/yakcloud_deploy.py b/scripts/yakcloud_deploy.py index fca9fcd..75f3a3e 100644 --- a/scripts/yakcloud_deploy.py +++ b/scripts/yakcloud_deploy.py @@ -211,7 +211,8 @@ def main() -> None: # 환경 해석: environments..{cluster,domains}. 하위호환: 없으면 top-level cluster:. envs = m.get("environments") or {} env_cfg = envs.get(ENV) or {} - ref = CLUSTER_REF or env_cfg.get("cluster") or m.get("cluster") + # environments 의 env 클러스터가 최우선(저장/전역 YAKCLOUD_CLUSTER 는 하위호환 폴백만). + ref = env_cfg.get("cluster") or CLUSTER_REF or m.get("cluster") if not ref: raise SystemExit( f"환경 '{ENV}' 대상 클러스터 미지정 — 매니페스트 environments.{ENV}.cluster (또는 YAKCLOUD_CLUSTER). "