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>
This commit is contained in:
wbsong111
2026-08-19 11:28:21 +09:00
parent acf7a016e7
commit 3aa69e5eda
181 changed files with 50818 additions and 1 deletions
@@ -0,0 +1,232 @@
{{- if .Values.commitServer.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.commitServer.deploymentAnnotations) }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
name: {{ template "argo-cd.commitServer.fullname" . }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.commitServer.name "name" .Values.commitServer.name) | nindent 4 }}
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentLabels) .Values.commitServer.deploymentLabels) }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.commitServer.deploymentStrategy) }}
strategy:
{{- trim . | nindent 4 }}
{{- end }}
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.commitServer.name) | nindent 6 }}
template:
metadata:
annotations:
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.commitServer.podAnnotations) }}
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.commitServer.name "name" .Values.commitServer.name) | nindent 8 }}
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.commitServer.podLabels) }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.commitServer.runtimeClassName | default .Values.global.runtimeClassName }}
runtimeClassName: {{ . }}
{{- end }}
{{- with .Values.commitServer.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.global.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.global.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.commitServer.priorityClassName | default .Values.global.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.commitServer.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ . }}
{{- end }}
serviceAccountName: {{ include "argo-cd.commitServer.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.commitServer.automountServiceAccountToken }}
containers:
- name: {{ .Values.commitServer.name }}
image: {{ default .Values.global.image.repository .Values.commitServer.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.commitServer.image.tag }}
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.commitServer.image.imagePullPolicy }}
args:
- /usr/local/bin/argocd-commit-server
{{- with .Values.commitServer.extraArgs }}
{{- toYaml . | nindent 8 }}
{{- end }}
env:
{{- with (concat .Values.global.env .Values.commitServer.extraEnv) }}
{{- tpl (toYaml .) $ | nindent 10 }}
{{- end }}
- name: ARGOCD_COMMIT_SERVER_LISTEN_ADDRESS
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: commitserver.listen.address
optional: true
- name: ARGOCD_COMMIT_SERVER_METRICS_LISTEN_ADDRESS
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: commitserver.metrics.listen.address
optional: true
- name: ARGOCD_COMMIT_SERVER_LOGFORMAT
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: commitserver.log.format
optional: true
- name: ARGOCD_COMMIT_SERVER_LOGLEVEL
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: commitserver.log.level
optional: true
- name: ARGOCD_LOG_FORMAT_TIMESTAMP
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: log.format.timestamp
optional: true
{{- with .Values.commitServer.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
ports:
- containerPort: 8086
name: server
protocol: TCP
- containerPort: 8087
name: metrics
protocol: TCP
{{- if .Values.commitServer.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.commitServer.livenessProbe.httpPath }}
port: 8087
initialDelaySeconds: {{ .Values.commitServer.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.commitServer.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.commitServer.livenessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.commitServer.livenessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.commitServer.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.commitServer.readinessProbe.httpPath }}
port: 8087
initialDelaySeconds: {{ .Values.commitServer.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.commitServer.readinessProbe.periodSeconds }}
failureThreshold: {{ .Values.commitServer.readinessProbe.failureThreshold }}
timeoutSeconds: {{ .Values.commitServer.readinessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.commitServer.startupProbe.enabled }}
startupProbe:
httpGet:
path: {{ .Values.commitServer.startupProbe.httpPath }}
port: 8087
initialDelaySeconds: {{ .Values.commitServer.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.commitServer.startupProbe.periodSeconds }}
failureThreshold: {{ .Values.commitServer.startupProbe.failureThreshold }}
timeoutSeconds: {{ .Values.commitServer.startupProbe.timeoutSeconds }}
{{- end }}
resources:
{{- toYaml .Values.commitServer.resources | nindent 10 }}
{{- with .Values.commitServer.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.commitServer.lifecycle }}
lifecycle:
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
{{- with (concat .Values.global.extraVolumeMounts .Values.commitServer.extraVolumeMounts) }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: ssh-known-hosts
mountPath: /app/config/ssh
- name: tls-certs
mountPath: /app/config/tls
- name: gpg-keys
mountPath: /app/config/gpg/source
- name: gpg-keyring
mountPath: /app/config/gpg/keys
# We need a writeable temp directory for the askpass socket file.
- name: tmp
mountPath: /tmp
volumes:
{{- with (concat .Values.global.extraVolumes .Values.commitServer.extraVolumes) }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: ssh-known-hosts
configMap:
name: argocd-ssh-known-hosts-cm
- name: tls-certs
configMap:
name: argocd-tls-certs-cm
- name: gpg-keys
configMap:
name: argocd-gpg-keys-cm
- name: gpg-keyring
emptyDir: {}
- name: tmp
emptyDir: {}
- name: argocd-commit-server-tls
secret:
secretName: argocd-commit-server-tls
optional: true
items:
- key: tls.crt
path: tls.crt
- key: tls.key
path: tls.key
- key: ca.crt
path: ca.crt
{{- with include "argo-cd.affinity" (dict "context" . "component" .Values.commitServer) }}
affinity:
{{- trim . | nindent 8 }}
{{- end }}
{{- with .Values.commitServer.nodeSelector | default .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.commitServer.tolerations | default .Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.commitServer.topologySpreadConstraints | default .Values.global.topologySpreadConstraints }}
topologySpreadConstraints:
{{- range $constraint := . }}
- {{ toYaml $constraint | nindent 8 | trim }}
{{- if not $constraint.labelSelector }}
labelSelector:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.commitServer.name) | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.commitServer.hostNetwork }}
hostNetwork: {{ .Values.commitServer.hostNetwork }}
{{- end }}
{{- with .Values.commitServer.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
dnsPolicy: {{ .Values.commitServer.dnsPolicy }}
{{- end }}
@@ -0,0 +1,35 @@
{{- if and .Values.commitServer.enabled .Values.commitServer.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "argo-cd.commitServer.fullname" . }}-metrics
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.commitServer.name "name" "metrics") | nindent 4 }}
{{- with .Values.commitServer.metrics.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if or .Values.commitServer.metrics.service.annotations .Values.global.addPrometheusAnnotations }}
annotations:
{{- if .Values.global.addPrometheusAnnotations }}
prometheus.io/port: {{ .Values.commitServer.metrics.service.servicePort | quote }}
prometheus.io/scrape: "true"
{{- end }}
{{- range $key, $value := .Values.commitServer.metrics.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.commitServer.metrics.service.type }}
{{- if and .Values.commitServer.metrics.service.clusterIP (eq .Values.commitServer.metrics.service.type "ClusterIP") }}
clusterIP: {{ .Values.commitServer.metrics.service.clusterIP }}
{{- end }}
{{- include "argo-cd.dualStack" . | indent 2 }}
ports:
- name: {{ .Values.commitServer.metrics.service.portName }}
protocol: TCP
port: {{ .Values.commitServer.metrics.service.servicePort }}
targetPort: 8087
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.commitServer.name) | nindent 4 }}
{{- end }}
@@ -0,0 +1,25 @@
{{- if and .Values.commitServer.enabled (or .Values.commitServer.networkPolicy.create .Values.global.networkPolicy.create)}}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "argo-cd.commitServer.fullname" . }}
namespace: {{ include "argo-cd.namespace" . }}
spec:
podSelector:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.commitServer.name) | nindent 6 }}
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 14 }}
ports:
- protocol: TCP
port: 8086
- from:
- namespaceSelector: { }
ports:
- port: 8087
{{- end }}
@@ -0,0 +1,26 @@
{{- if .Values.commitServer.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "argo-cd.commitServer.fullname" . }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.commitServer.name "name" .Values.commitServer.name) | nindent 4 }}
{{- with .Values.commitServer.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.commitServer.service.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
ports:
- name: {{ .Values.commitServer.service.portName }}
protocol: TCP
port: {{ .Values.commitServer.service.port }}
targetPort: server
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.commitServer.name) | nindent 4 }}
{{- end }}
@@ -0,0 +1,19 @@
{{- if and .Values.commitServer.enabled .Values.commitServer.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.commitServer.serviceAccount.automountServiceAccountToken }}
metadata:
name: {{ include "argo-cd.commitServer.serviceAccountName" . }}
namespace: {{ include "argo-cd.namespace" . }}
{{- with .Values.commitServer.serviceAccount.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.commitServer.name "name" .Values.commitServer.name) | nindent 4 }}
{{- with .Values.commitServer.serviceAccount.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,32 @@
{{- if and (.Values.commitServer.vpa) (.Values.commitServer.vpa.enabled) }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ include "argo-cd.commitServer.fullname" . }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.commitServer.name "name" .Values.commitServer.name) | nindent 4 }}
{{- with .Values.commitServer.vpa.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.commitServer.vpa.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.commitServer.vpa.recommenders }}
recommenders: {{- toYaml . | nindent 4 }}
{{- end }}
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: {{ template "argo-cd.commitServer.fullname" . }}
updatePolicy:
updateMode: {{ .Values.commitServer.vpa.updateMode | quote }}
resourcePolicy:
containerPolicies:
- containerName: {{ .Values.commitServer.name }}
{{ with .Values.commitServer.vpa.containerPolicy }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}