Repository navigation
ELOG 017 argocd self managed gitops
wcorn edited this page Jun 19, 2026
·
1 revision
| 항목 | 내용 |
|---|---|
| 분류 | 🔧 트러블슈팅 |
| 날짜 | 2026-06-19 |
| 영역 | Infra |
| 관련 이슈/PR | #544, #550/#551, #552/#553, #555/#556, #561/#562 |
| 상태 | 해결 |
LatencyBurnRateFast(be, critical, 14.4×) 알림으로 시작. be GET /api/planner/calendar가 매 요청 500~1200ms로 p95<500ms SLO를 위반(30분 p95 1739ms). 파드/리소스는 정상(CPU 3m, Mem 475Mi), DB 테이블은 거의 비어있어 슬로우쿼리·N+1·인덱스 문제가 아니었다.
알림 sweep 중 info 레벨 2종이 별도로 지속 발화: KubeQuotaAlmostFull(monitoring, 3일째), CPUThrottlingHigh(monitoring node-exporter, argocd repo-server).
-
지연(be):
PlannerCalendarService.getFeed()가 Google events·DB reviews·Google tasks를 직렬 합성하고, tasks는 무캐시 매 요청 라이브 호출. 외부 Google API TLS 왕복(+토큰 캐시 미스 시 refresh-grant)이 지연의 전부. 인프라가 아닌 BE 코드 문제 → #544로 인계. -
quota: monitoring
requests.cpu사용 1845m/hard 2000m = 92%. 이전 작업(#541)에서limits.cpu만 8→16으로 올리고requests.cpu는 2로 방치한 것이 원인. -
자기관리 공백(핵심): repo-server throttle을 고치려
helm/argocd/values.yaml을 바꿨으나 어디서도 자동 반영되지 않음을 발견. ArgoCD 본체는 chicken-and-egg로 GitOps 밖이었고, Ansibleargocd_bootstraprole은 "이미 설치됐으면 skip"(부트스트랩 전용), App-of-Apps에는 argocd 본체를 관리하는 Application이 부재. 유일한 반영 경로가 수동helm upgrade였는데, 운영 모델은 이미 "수동 배포 없음(Ansible 또는 App-of-Apps)"으로 이행한 상태라 모순.
- #544: calendar 지연 근본원인(Google API 직렬·tasks 무캐시)을 BE에 버그 인계(tasks 캐싱 + 3소스 병렬화 제안).
-
#551: monitoring
requests.cpu2→3, node-exporter cpu limit 200→300m. ArgoCD 자동 sync로 반영. -
#553 (핵심): ArgoCD를 multi-source self-managed Application으로 App-of-Apps에 편입.
- source1 = upstream
argo/argo-cd9.4.10, source2 = repo(ref: values) →$values/infra/helm/argocd/values.yaml -
values.yaml을 top-level 단일 파일로 유지해 Ansible 부트스트랩의-f values.yaml과 동일 소스 공유(이중 관리 제거). 최초 설치만 Ansible, 이후 업그레이드는 GitOps. -
project.yamlsourceRepos에argoproj.github.io/argo-helm추가.prune:false(오설정이 ArgoCD 자기 삭제로 번지지 않게).
- source1 = upstream
-
#556: 자기관리 후
argocdApplication이 영구 OutOfSync. 원인은 argo-cd 차트가 notifications 컨트롤러와 함께argocd-notifications-cm/secret도 기본 렌더 → 전용argocd-notifications앱과 동일 객체 경합.notifications.cm.create=false,secret.create=false로 차트는 컨트롤러만, config는 전용 앱 단독 소유. - #562: 자기관리로 application-controller가 앱을 1개 더 조정 → 500m에서 29% throttle. controller cpu 500→750m. dex 메모리 64Mi limit 90% 상시 근접 → 128Mi.
-
argocdApplication Synced/Healthy 안착, OutOfSync 리소스 0. repo-server 750m 자동 반영(마지막 argocd throttle 원인 해소). - monitoring
requests.cpu사용률 92% → 61%, KubeQuotaAlmostFull 해소. node-exporter throttle 25% → 18%. - dex 메모리 90% → 37%(128Mi 기준), application-controller throttle 29% → steady-state 2%대.
-
이후
helm/argocd/values.yaml변경은 머지만으로 GitOps 자동 반영 — "수동 배포 없음" 운영 모델의 마지막 공백 제거. - 시작점 be 지연 알림은 트래픽 멈춤으로 critical 자동 해소, 근본원인은 #544로 BE 진행.
- info 알림이 진짜 아키텍처 공백을 가린다. repo-server throttle이라는 사소한 info 알림을 고치려다 "ArgoCD 본체가 어떤 자동 경로로도 반영 안 됨"이라는 구조적 공백을 발견했다. 알림 하나를 끝까지 따라가면 설계 부채가 드러난다.
-
ArgoCD 자기관리의 함정 2가지: (1) 차트가 다른 앱과 같은 객체(notifications cm/secret)를 렌더하면 소유권 경합으로 영구 OutOfSync → 한쪽에서
create:false로 소유권 명확화. (2) 관리 대상이 +1 되면 application-controller 부하가 늘어 throttle 임계를 살짝 넘김. - CPUThrottlingHigh(info)는 limit 상향으로 쫓지 말 것. limit을 올릴 때마다 파드가 재기동돼 5분 윈도우에 startup 버스트가 잡혀 transient하게 재발한다. steady-state(2m 윈도우)가 정상이면 둔다. 계속 시끄러우면 리소스가 아니라 룰 임계 튜닝이 정답(ELOG-016 노이즈 정리의 연장선).
- values를 top-level 단일 파일로 유지한 덕에 부트스트랩(Ansible)과 자기관리(ArgoCD)가 같은 파일을 공유 — wrapper chart로 만들었다면 값 nesting/Chart.lock 때문에 raw-URL 부트스트랩과 분기됐을 것.