Files
wbsong111 3aa69e5eda argo-cd: 10.4.0 (ArgoCD v3.5.1) 추가 + 배포 테스트 스크립트
k8s 1.33 에서 Deployment/ReplicaSet 에 추가된 .status.terminatingReplicas 를
ArgoCD v2.14.5(k8s 라이브러리 0.31/0.32)가 몰라, 클러스터가 1.33 이상이면
ServerSideApply=true 인 Application 이 전부 아래 오류로 죽는다.

  ComparisonError: failed to calculate diff: error calculating structured
  merge diff: .status.terminatingReplicas: field not declared in schema

v3.5.1 은 k8s 라이브러리 0.36.1 을 써서 해소된다. dev 클러스터(1.35.7+rke2r1)
에서 실제 발생·해소를 확인했다.

- manifests/helm/argo-cd/10.4.0/ 추가 (chart_updater 로 생성)
  - custom-values.yaml 을 실제 배포 기준(dipup argo-cd-values.yaml.tpl)에 맞춤:
    kong → apisix, server.extraArgs(--insecure), configs.cm/rbac 추가
  - configs.params.controller.resource.health.persist=true 지정 —
    ArgoCD v3.0 부터 리소스 health 를 CR 에 저장하지 않는 것이 기본값인데,
    dip-console-api 가 .status.resources[].health 를 읽는다
  - CUSTOM-README.md 는 현재 차트 기준 배포 가이드로 재작성.
    승계된 cert-manager 예시가 10.4.0 에 없는 구버전 스키마(hosts/tls 리스트)라
    Ingress 가 생성되지 않는 상태였던 것도 함께 수정
  - breaking_change_check: breaking=false (제거 26건이 전부 미사용 key)

- scripts/deploy-test/deploy-test-argo-cd.sh 신규
  같은 클러스터에 두 번째 argo-cd 를 띄우려면 crds.install=false 가 필수다 —
  CRD 3종이 클러스터 전역이고 운영 릴리스가 소유해 Helm 이 ownership 충돌로
  거부한다. Ingress 도 항상 끈다(운영과 host 충돌).
  검증: 워크로드 롤아웃 / health.persist / api 버전 / admin 로그인

- argo-cd/7.8.11/BUILD-README.md 에 `helm repo add argo ...` 추가
  chart_version_detector 가 이 한 줄을 정규식으로 뽑아 업스트림 레포를 정하는데,
  argo-cd 에는 없어서 신규 버전 자동 감지가 조용히 실패하고 있었다
  (repo: null → latest_version: null). CLAUDE.md 의 "변경 금지" 규정도
  실제 파싱 계약에 맞게 정정했다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 11:28:21 +09:00

78 lines
2.2 KiB
Markdown

## ArgoCD 버전 갱신 가이드
ArgoCD Helm Chart의 버전의 갱신할 경우 작업의 시작은 항상 main에서 이루어져야 한다.
- 서비스 카탈로그 git 다운로드
```
$ git clone https://github.com/paasup/service-catalog.git
```
- 작업 브랜치로 체크아웃
```
$ git checkout -b update-argocd/7.8.0
```
- argo-cd 차트 다운로드
``` sh
# charts 디렉토리로 이동
cd ~/dip-catalog/charts
# helm repo 추가
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
# helm 차트 조회
helm search repo argo/argo-cd
# helm 차트 다운로드
helm pull argo/argo-cd --version=10.4.0
```
## 배포 검증
렌더가 되는 것으로는 부족하다. 실제로 뜨고 API 가 응답하는지 확인한다.
```sh
# 차트 기본값으로 검증
bash scripts/deploy-test/deploy-test-argo-cd.sh /tmp/argocd-deploy-test-out
# 실제 배포에 쓸 values 로 검증 (admin 비밀번호를 승계하는 경우 로그인까지 확인)
VALUES_FILE=/path/to/argocd-values.yaml ADMIN_PASSWORD=<평문 비밀번호> \
bash scripts/deploy-test/deploy-test-argo-cd.sh /tmp/argocd-deploy-test-out
```
최소한 다음을 통과해야 한다.
1. Deployment 6종 + StatefulSet 1종 롤아웃 완료
2. `argocd-cmd-params-cm` 의 `controller.resource.health.persist` 가 `true`
3. `/api/version` 이 차트 `appVersion` 과 일치
4. `ADMIN_PASSWORD` 지정 시 `/api/v1/session` 로그인 성공
> 스크립트는 `crds.install=false` 로 설치한다. CRD 3종은 클러스터 전역이고 운영 릴리스가
> 소유하고 있어, 그대로 설치하면 Helm 이 ownership 충돌로 거부한다. 그래서 **CRD 가 이미
> 있는 클러스터에서만** 동작하며 스크립트가 사전에 확인한다. Ingress 도 항상 끈다 —
> 운영과 같은 host 로 뜨면 트래픽을 가로챈다.
- 갱신작업 진행후 commit
```
$ git add .
$ git commit -m "update argocd/7.8.0 {TAG_NAME}"
```
- main 브랜치에 체크아웃 후 merge
```
$ git checkout main
$ git merge update-argocd/7.8.0
```
- git에 push 후 작업 브랜치 삭제
```
$ git push -u origin main
$ git branch -d update-argocd/7.8.0
```
- git tag 추가 후 push
```
$ git tag argocd/7.8.0
$ git push origin argocd/7.8.0
```