# etcd 버전 갱신 가이드 ## 1. git 작업 환경 구성 ```sh git clone https://github.com/paasup/dip-catalog.git cd dip-catalog git checkout -b update-etcd/<신규버전> ``` ## 2. helm chart 업데이트 ### 1) 신규 버전 확인 ```sh helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/ helm repo update groundhog2k helm search repo groundhog2k/etcd --versions | head ``` 차트 버전과 etcd 버전(appVersion)은 다르다. 대응 관계를 반드시 확인한다. | 차트 버전 | etcd(appVersion) | | --- | --- | | 1.1.12 | v3.7.1 | ### 2) 이미지 레지스트리 재확인 (매 버전 갱신 시 필수) `CUSTOM-README.md` 에 적어둔 대로 etcd 프로젝트는 `gcr.io/etcd-development`, `quay.io/coreos` 를 **3.8부터 폐지**하고 `registry.k8s.io/etcd` 로 이전한다 ([etcd-io/etcd#20928](https://github.com/etcd-io/etcd/issues/20928)). 버전을 올릴 때마다 아래를 확인해 어느 레지스트리로 고정할지 다시 판단한다. ```sh NEW_VER=v3.8.0 # 예시 # registry.k8s.io 에 신규 버전이 이미 올라와 있는지 확인 curl -sL "https://registry.k8s.io/v2/etcd/tags/list" | grep "\"$NEW_VER\"" # 아직 없다면 과도기 레지스트리(quay.io/coreos, gcr.io/etcd-development)로 폴백 ``` ### 3) 신규 버전 디렉토리 생성 버전별 독립 디렉토리다. 기존 디렉토리를 수정하지 않고 새로 만든다. ```sh NEW=1.2.0 OLD=1.1.12 cd manifests/helm/etcd helm pull groundhog2k/etcd --version "$NEW" --untar --untardir /tmp/etcd-pull mkdir -p "$NEW" cp -R /tmp/etcd-pull/etcd/. "$NEW"/ # PaaSup 관리 파일을 이전 버전에서 승계한다 for f in custom-values.yaml dip-values.yaml dip-resources-quotas.yaml \ dip-volumes-quotas.yaml CUSTOM-README.md BUILD-README.md; do cp "$OLD/$f" "$NEW/$f" done ``` ### 4) diff 확인 ```sh diff -u "$OLD/values.yaml" "$NEW/values.yaml" | less helm template test "$NEW" -f "$NEW/custom-values.yaml" >/dev/null && echo "렌더링 OK" ``` `custom-values.yaml` 의 `image.tag`/`initImage.tag` 를 신규 appVersion·busybox 최신 고정 태그로 갱신한다(위 2번 결과 반영). ### 5) 렌더링 결과 비교 ```sh helm template etcd "$OLD" -f "$OLD/custom-values.yaml" -n etcd-system > /tmp/old.yaml helm template etcd "$NEW" -f "$NEW/custom-values.yaml" -n etcd-system > /tmp/new.yaml diff -u /tmp/old.yaml /tmp/new.yaml ``` ## 3. 문서 갱신 | 파일 | 갱신 내용 | | --- | --- | | `CUSTOM-README.md` | 차트/etcd 버전 번호, 이미지 레지스트리 판단 결과 | | `BUILD-README.md` | 위 버전 대응 표에 신규 행 추가 | | `scripts/deploy-test/deploy-test-etcd.sh` | 신규 버전으로 배포 검증 재실행 | ## 4. 배포 검증 ```sh IMAGE_NAME=/: bash scripts/deploy-test/deploy-test-etcd.sh /tmp/etcd-deploy-test-out ``` 최소한 다음을 통과해야 한다. 1. 3-replica StatefulSet 이 모두 `Running` 2. `etcdctl endpoint health --cluster` 전 멤버 healthy 3. `etcdctl put`/`get` 쓰기·읽기 왕복 확인 ## 5. PR ```sh git add manifests/helm/etcd/<신규버전> doc/ git commit -m "etcd <신규버전> 추가" git push -u origin update-etcd/<신규버전> ``` PR 생성 시 `helm-catalog-sbom` 워크플로가 변경 차트에 대해 SBOM·취약점 스캔을 수행한다. CRITICAL 취약점이 있으면 내용을 확인하고 PR 본문에 판단 근거를 남긴다.