cli v0.13.0: 공유 외부 소스 CLI 선언(source add --shared, mode:shared) + 문서 3계층·cluster create 정리

source add --shared / requires[].mode:shared 로 공유 외부 소스를 매니페스트에 선언 → 배포 시 백엔드가 클러스터별 격리 DB/계정 민팅(인클러스터 StatefulSet 없음, 소용량 클러스터용). reconcile_source 가 mode 를 POST /services 로 전달(local 하드코딩 제거). 문서(슬래시명령·매니페스트 템플릿·DATA-SOURCES·SKILL·bin help): 로컬 dev/migrate 제거·dev/val/prod 3계층 승격(promote --to)·cluster create/ls·project check --env 반영.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jungwoo choi
2026-08-28 12:08:11 +09:00
parent 2281039c1b
commit 89fca872c0
7 changed files with 56 additions and 32 deletions

View File

@ -232,10 +232,17 @@ def cmd_source(a) -> None:
if a.action == "add":
if any(r.get("name") == a.name for r in reqs):
sys.exit(" ✗ 이미 있음: %s" % a.name)
reqs.append({"name": a.name, "type": a.type, "plan": a.plan})
save_manifest(m)
print(" ✓ requires += {name=%s, type=%s, plan=%s}" % (a.name, a.type, a.plan))
print(" · 프로비저닝/바인딩은 'yakcloud bind <workload> %s <alias>''yakcloud deploy'" % a.name)
if getattr(a, "shared", False): # 공유 외부 소스 — 배포 시 백엔드가 클러스터별 격리 DB/계정 민팅
reqs.append({"name": a.name, "type": a.type, "mode": "shared"})
save_manifest(m)
print(" ✓ requires += {name=%s, type=%s, mode=shared}" % (a.name, a.type))
print(" · 공유 외부 소스 — 배포 시 백엔드가 클러스터별 격리 DB/계정 민팅(인클러스터 StatefulSet 없음).")
print(" · 바인딩: 'yakcloud bind <workload> %s <alias>''yakcloud deploy'" % a.name)
else:
reqs.append({"name": a.name, "type": a.type, "plan": a.plan})
save_manifest(m)
print(" ✓ requires += {name=%s, type=%s, plan=%s}" % (a.name, a.type, a.plan))
print(" · 프로비저닝/바인딩은 'yakcloud bind <workload> %s <alias>''yakcloud deploy'" % a.name)
else: # rm
m["requires"] = [r for r in reqs if r.get("name") != a.name]
# 관련 바인딩도 정리
@ -362,7 +369,10 @@ def build_parser() -> argparse.ArgumentParser:
sosub = so.add_subparsers(dest="action", required=True)
sol = sosub.add_parser("ls", help="클러스터에서 이용 가능한 소스 목록"); sol.set_defaults(fn=cmd_source_ls)
soa = sosub.add_parser("add"); soa.add_argument("name"); soa.add_argument("type")
soa.add_argument("plan", nargs="?", default="small"); soa.set_defaults(fn=cmd_source)
soa.add_argument("plan", nargs="?", default="small")
soa.add_argument("--shared", action="store_true",
help="공유 외부 소스(mode:shared) — 백엔드가 클러스터별 격리 DB/계정 민팅(소용량 클러스터용, 현재 mongodb)")
soa.set_defaults(fn=cmd_source)
sor = sosub.add_parser("rm"); sor.add_argument("name"); sor.set_defaults(fn=cmd_source)
b = sub.add_parser("bind", help="워크로드에 소스 바인딩")