Files
service-catalog/manifests/helm/argo-cd/10.4.0/templates/dex/deployment.yaml
T
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

275 lines
11 KiB
YAML

{{- if .Values.dex.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.dex.deploymentAnnotations) }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
name: {{ template "argo-cd.dex.fullname" . }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }}
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentLabels) .Values.dex.deploymentLabels) }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with include "argo-cd.strategy" (mergeOverwrite (deepCopy .Values.global.deploymentStrategy) .Values.dex.deploymentStrategy) }}
strategy:
{{- trim . | nindent 4 }}
{{- end }}
replicas: 1
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }}
template:
metadata:
annotations:
checksum/cmd-params: {{ include (print $.Template.BasePath "/argocd-configs/argocd-cmd-params-cm.yaml") . | sha256sum }}
{{- if (index .Values.configs.cm "dex.config") }}
checksum/cm: {{ include (print $.Template.BasePath "/argocd-configs/argocd-cm.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.dex.certificateSecret.enabled }}
checksum/dex-server-tls: {{ include (print $.Template.BasePath "/argocd-configs/argocd-dex-server-tls-secret.yaml") . | sha256sum }}
{{- end }}
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.dex.podAnnotations) }}
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 8 }}
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.dex.podLabels) }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.dex.runtimeClassName | default .Values.global.runtimeClassName }}
runtimeClassName: {{ . }}
{{- end }}
{{- with .Values.dex.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.dex.priorityClassName | default .Values.global.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- if .Values.dex.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.dex.terminationGracePeriodSeconds }}
{{- end }}
serviceAccountName: {{ template "argo-cd.dex.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.dex.automountServiceAccountToken }}
containers:
- name: {{ .Values.dex.name }}
image: {{ .Values.dex.image.repository }}:{{ .Values.dex.image.tag }}
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.dex.image.imagePullPolicy }}
command:
- /shared/argocd-dex
{{- with .Values.dex.logLevel }}
- --loglevel={{ . }}
{{- end }}
{{- with .Values.dex.logFormat }}
- --logformat={{ . }}
{{- end }}
args:
- rundex
{{- with .Values.dex.extraArgs }}
{{- toYaml . | nindent 8 }}
{{- end }}
env:
{{- with (concat .Values.global.env .Values.dex.env) }}
{{- tpl (toYaml .) $ | nindent 10 }}
{{- end }}
- name: ARGOCD_DEX_SERVER_LOGFORMAT
valueFrom:
configMapKeyRef:
key: dexserver.log.format
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_DEX_SERVER_LOGLEVEL
valueFrom:
configMapKeyRef:
key: dexserver.log.level
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_LOG_FORMAT_TIMESTAMP
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: log.format.timestamp
optional: true
- name: ARGOCD_DEX_SERVER_DISABLE_TLS
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: dexserver.disable.tls
optional: true
{{- with .Values.dex.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.dex.containerPorts.http }}
protocol: TCP
- name: grpc
containerPort: {{ .Values.dex.containerPorts.grpc }}
protocol: TCP
- name: metrics
containerPort: {{ .Values.dex.containerPorts.metrics }}
protocol: TCP
{{- if .Values.dex.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.dex.livenessProbe.httpPath }}
port: {{ .Values.dex.livenessProbe.httpPort }}
scheme: {{ .Values.dex.livenessProbe.httpScheme }}
initialDelaySeconds: {{ .Values.dex.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dex.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dex.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.dex.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.dex.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.dex.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.dex.readinessProbe.httpPath }}
port: {{ .Values.dex.readinessProbe.httpPort }}
scheme: {{ .Values.dex.readinessProbe.httpScheme }}
initialDelaySeconds: {{ .Values.dex.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dex.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dex.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.dex.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.dex.readinessProbe.failureThreshold }}
{{- end }}
{{- if .Values.dex.startupProbe.enabled }}
startupProbe:
httpGet:
path: {{ .Values.dex.startupProbe.httpPath }}
port: {{ .Values.dex.startupProbe.httpPort }}
scheme: {{ .Values.dex.startupProbe.httpScheme }}
initialDelaySeconds: {{ .Values.dex.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dex.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dex.startupProbe.timeoutSeconds }}
successThreshold: {{ .Values.dex.startupProbe.successThreshold }}
failureThreshold: {{ .Values.dex.startupProbe.failureThreshold }}
{{- end }}
resources:
{{- toYaml .Values.dex.resources | nindent 10 }}
{{- with .Values.dex.containerSecurityContext }}
securityContext:
{{- if $.Values.openshift.enabled }}
{{- omit . "runAsUser" | toYaml | nindent 10 }}
{{- else }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
volumeMounts:
{{- with (concat .Values.global.extraVolumeMounts .Values.dex.volumeMounts) }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: static-files
mountPath: /shared
- name: dexconfig
mountPath: /tmp
- name: argocd-dex-server-tls
mountPath: /tls
{{- with .Values.dex.extraContainers }}
{{- tpl (toYaml .) $ | nindent 6 }}
{{- end }}
initContainers:
- name: copyutil
image: {{ default .Values.global.image.repository .Values.dex.initImage.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.dex.initImage.tag }}
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.dex.initImage.imagePullPolicy }}
command:
- /bin/cp
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
volumeMounts:
- mountPath: /shared
name: static-files
- mountPath: /tmp
name: dexconfig
resources:
{{- toYaml (default .Values.dex.resources .Values.dex.initImage.resources) | nindent 10 }}
{{- with .Values.dex.containerSecurityContext }}
securityContext:
{{- if $.Values.openshift.enabled }}
{{- omit . "runAsUser" | toYaml | nindent 10 }}
{{- else }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- with .Values.dex.initContainers }}
{{- tpl (toYaml .) $ | nindent 6 }}
{{- end }}
{{- with include "argo-cd.affinity" (dict "context" . "component" .Values.dex) }}
affinity:
{{- trim . | nindent 8 }}
{{- end }}
{{- with .Values.dex.nodeSelector | default .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dex.tolerations | default .Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dex.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.dex.name) | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
volumes:
- name: static-files
{{- if .Values.dex.emptyDir.sizeLimit }}
emptyDir:
sizeLimit: {{ .Values.dex.emptyDir.sizeLimit }}
{{- else }}
emptyDir: {}
{{- end }}
- name: dexconfig
{{- if .Values.dex.emptyDir.sizeLimit }}
emptyDir:
sizeLimit: {{ .Values.dex.emptyDir.sizeLimit }}
{{- else }}
emptyDir: {}
{{- end }}
- name: argocd-dex-server-tls
secret:
secretName: argocd-dex-server-tls
optional: true
items:
- key: tls.crt
path: tls.crt
- key: tls.key
path: tls.key
- key: ca.crt
path: ca.crt
{{- with (concat .Values.global.extraVolumes .Values.dex.volumes) }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.dex.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
dnsPolicy: {{ .Values.dex.dnsPolicy }}
{{- end }}