apiVersion: apps/v1 kind: Deployment metadata: labels: app.kubernetes.io/component: redis app.kubernetes.io/name: argocd-redis app.kubernetes.io/part-of: argocd name: argocd-redis namespace: argocd spec: progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app.kubernetes.io/name: argocd-redis strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: labels: app.kubernetes.io/name: argocd-redis spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: matchLabels: app.kubernetes.io/name: argocd-redis topologyKey: kubernetes.io/hostname weight: 100 - podAffinityTerm: labelSelector: matchLabels: app.kubernetes.io/part-of: argocd topologyKey: kubernetes.io/hostname weight: 5 containers: - args: - --save - '' - --appendonly - 'no' - --requirepass $(REDIS_PASSWORD) env: - name: REDIS_PASSWORD valueFrom: secretKeyRef: key: auth name: argocd-redis image: public.ecr.aws/docker/library/redis:8.2.3-alpine imagePullPolicy: Always name: redis ports: - containerPort: 6379 protocol: TCP resources: limits: cpu: 200m memory: 128Mi requests: cpu: 50m memory: 64Mi securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL readOnlyRootFilesystem: true terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst initContainers: - command: - argocd - admin - redis-initial-password image: quay.io/argoproj/argocd:v3.3.6 imagePullPolicy: IfNotPresent name: secret-init resources: {} securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL readOnlyRootFilesystem: true runAsNonRoot: true seccompProfile: type: RuntimeDefault terminationMessagePath: /dev/termination-log terminationMessagePolicy: File # NO es el nodeSelector por defecto de ArgoCD. Anclado a mano al # control-plane, junto con los límites de recursos del contenedor: # sin ello este pod muere con Exit Code 255 tras varios días de # uptime. Ver argocd-patches/redis-patch.yaml, que documenta el # parche para volver a aplicarlo tras actualizar ArgoCD. nodeSelector: kubernetes.io/hostname: chemavx-k8 restartPolicy: Always schedulerName: default-scheduler securityContext: runAsNonRoot: true runAsUser: 999 seccompProfile: type: RuntimeDefault serviceAccount: argocd-redis serviceAccountName: argocd-redis terminationGracePeriodSeconds: 30