Repository navigation
feat: 업데이트된 워크로드 CRD 를 모델·예시에 반영 (AIP-3585) - #129
Merged
Merged
Conversation
cluster10 배포본과 대조해 Workspace(v1beta1) 모델에 빠져 있던 3건을 채운다. Operation 은
AIP-2269 에서 이미 같은 모양으로 반영돼 있다.
- expose.inference{host, path} — 추론 노출은 항상 HTTPS 라 tls 가 없다
- spec.suspendOption.commit{enabled, repository, applyImage}
- status.suspendCommit{image, prevImage, appliedImage}
tools[].type 에 vscode 가 추가됐지만 DTO 는 String 으로 둔다. enum 으로 바꾸면 다음 tool 이
들어올 때 역직렬화가 깨지고, 컨트롤러가 이 값으로 분기하지도 않는다.
ServiceExposure 는 DTO 를 만들지 않는다. 인포머·RBAC·웹훅 어디에서도 참조하지 않아 dead code 가
된다.
리컨실 경로가 워크로드 CR 에서 이름·라벨만 쓰기 때문에 필드명을 틀려도 런타임에 증상이 없다.
인포머와 같은 Gson 으로 역직렬화를 고정하는 테스트 4건을 함께 넣는다.
kubernetes/examples/crd.yaml 의 operations·workspaces 문서를 c10-m1 덤프로 교체한다.
PodTemplateSpec 전문은 예시에 불필요해 기존 축약본을 그대로 끼웠다.
두 문서 다 현행과 어긋나 있었다.
- operations: ports[].external{enabled,host,path} — DTO 는 AIP-2269 에서 expose 로 옮겨갔는데
예시가 따라가지 않았다
- workspaces: 아예 v1 스키마였다(ssh.publicKey, status.addresses/pods/readyCondition). 클러스터에
v1 은 없어 그대로 적용하면 현행과 충돌한다 — v1beta1 로 교체
작업 문서 4종을 docs/aip-3585-workload-crd-sync/ 에 남긴다.
갱신 CRD 를 kind 에 적용해 Workspace/Operation/ServiceExposure 를 실제로 만들고, apiserver 가 저장한 JSON 을 인포머와 같은 Gson 으로 이 브랜치 DTO 에 역직렬화해 매핑을 확인했다. 손으로 쓴 픽스처가 아니라 저장분이라 defaulting 까지 포함된다. 새 CEL 검증 5종(inference 누락·inference+tcp 공존·포트 이름 vscode·포트 번호 17682· runAsNonRoot=true)이 전부 기대한 메시지로 거절하는 것도 함께 확인했다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 여기만은 꼭 봐주세요!!
diff 의 97% 는
kubernetes/examples/crd.yaml기계 재생성분이라 읽을 필요가 없다. 판단이 필요한 건 셋이다.workspaces예시가v1→v1beta1로 통째로 바뀐다. 클러스터에v1은 없다(현행은 v1beta1 단일, served+storage). 구 예시를 적용해 온 로컬 환경이 있다면 CRD 가 교체된다 — 이 전제가 맞는지만 봐주세요.kubernetes/examples/crd.yaml#L639
rules[].inference가 추가됐지만 인포머·RBAC·웹훅 참조가 0건이라 dead code 가 된다(AIP-3419 의 Cueue 와 같은 결론). 나중에 webhook 을 넣기로 하면 그때 만든다.docs/aip-3585-workload-crd-sync/01-plan.md
tools[].type을 enum 이 아닌String으로 둔 판단. CRD 에vscode가 추가됐는데, enum 으로 바꾸면 다음 tool 이 들어올 때 역직렬화가 깨진다. 컨트롤러가 이 값으로 분기하지도 않는다.V1beta1WorkspaceTool.java
Summary
c10-m1) 배포본과develop을 대조해 Workspace(v1beta1) 모델에 빠져 있던 3건을 채운다.623862f(AIP-2269)에서expose.inference가 들어가 이미 클러스터와 맞다. 같은 expose 구조를 공유하는 Workspace 만 빠져 있었다.kubernetes/examples/crd.yaml의operations·workspaces참조 사본을 클러스터 기준으로 다시 맞춘다.Changes
V1beta1WorkspacePortExpose에 nestedInference{host, path}추가.tls가 없는 것은 의도 — 추론 노출은 항상 HTTPS 라 CRD 에도 없다.V1beta1WorkspaceSuspendOption(commit{enabled, repository, applyImage}) ·V1beta1WorkspaceSuspendCommitStatus(image, prevImage, appliedImage) 신규 + Spec/Status 배선. 최상위 필드 1개당 DTO 1개 + nested 클래스는V1beta1WorkspaceSsh.Password와 같은 방식이다.examples/crd.yaml의 두 문서를 클러스터 덤프에서 기계 생성하고spec.template(PodTemplateSpec 전문 8천 줄)만 기존 축약본으로 교체.operations는 구 계약ports[].external을,workspaces는v1스키마를 들고 있었다.WorkloadDtoDeserializationTest4건 —expose.inference(WS/OP 양쪽) ·suspendOption.commit+status.suspendCommit·tools[].type=vscode.docs/aip-3585-workload-crd-sync/4종.알려진 트레이드오프 / 하위 호환성
rules도 리소스 plural 과 라벨 낙인 대상이 그대로라 변경 없다.spec.template은 여전히 축약본이다(containers/hostname/volumes). 이 파일을 실제 클러스터에 적용하면 pod spec 의 나머지 필드가 pruning 된다 — 예시 용도라는 기존 전제를 유지한다.Test plan
./gradlew clean compileJava compileTestJava test→ 317 tests / 0 failures / 0 errorsexpose.inference·suspendOption.commit·status.suspendCommit역직렬화expose.inference·status.ports[].type역직렬화tools[].type = vscode가 String 으로 그대로 실림examples/crd.yaml8-doc 파싱 · 손대지 않은 6개 문서 무변경examples/crd.yaml의 두 문서가template축약분 제외 클러스터와 완전 일치kubectl apply --dry-run=client·--server-side --dry-run=server(kind-local) 8-doc 통과inference누락 /inference+tcp공존 / 포트 이름vscode/ 포트 번호17682/runAsNonRoot: true가 전부 기대한 메시지로 거절bab74e36의 실제 생성 UI 를 브라우저 프로브로 1회(aipub-load-proberlocal-quick+BROWSER_CREATE=true): checks 779/779 ·http_req_failed0%,workload submit 2xx→workload create success통과. 프로브 구간 project-controller 에러 0건resourceNames편입 확인함께 보는 PR
aipub-load-proberchore/AIP-3585-crd-sync— 같은 클러스터 덤프로script/crds/의operation·workspace·serviceexposure사본을 갱신한다. 서로 독립적으로 머지 가능하다.🚀 Release Version
v5.2.0