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). "