apiVersion: apps/v1
kind: StatefulSet
metadata:
  creationTimestamp: "2024-12-16T16:59:16Z"
  generation: 1
  labels:
    app.kubernetes.io/component: redis
    app.kubernetes.io/managed-by: openshift-gitops
    app.kubernetes.io/name: openshift-gitops-redis-ha-server
    app.kubernetes.io/part-of: argocd
  name: openshift-gitops-redis-ha-server
  namespace: openshift-gitops
  ownerReferences:
  - apiVersion: argoproj.io/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: ArgoCD
    name: openshift-gitops
    uid: 2e5e8b1c-3fe5-43f1-9776-6c8e5c254c83
  resourceVersion: "17652213"
  uid: 64f43680-bb2e-40a3-8ae4-eff795fa5736
spec:
  persistentVolumeClaimRetentionPolicy:
    whenDeleted: Retain
    whenScaled: Retain
  podManagementPolicy: OrderedReady
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/name: openshift-gitops-redis-ha
  serviceName: openshift-gitops-redis-ha
  template:
    metadata:
      annotations:
        checksum/init-config: 7128bfbb51eafaffe3c33b1b463e15f0cf6514cec570f9d9c4f2396f28c724ac
      creationTimestamp: null
      labels:
        app.kubernetes.io/name: openshift-gitops-redis-ha
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchLabels:
                app.kubernetes.io/name: openshift-gitops-redis-ha
            topologyKey: kubernetes.io/hostname
      automountServiceAccountToken: false
      containers:
      - args:
        - redis-server
        - /data/conf/redis.conf
        env:
        - name: AUTH
          valueFrom:
            secretKeyRef:
              key: admin.password
              name: openshift-gitops-redis-initial-password
        image: registry.redhat.io/rhel8/redis-6@sha256:a848cc4edb4405846c673187dd68ce66c328dd1ad42f193f5737288c7971399d
        imagePullPolicy: IfNotPresent
        livenessProbe:
          exec:
            command:
            - sh
            - -c
            - /health/redis_liveness.sh
          failureThreshold: 5
          initialDelaySeconds: 30
          periodSeconds: 15
          successThreshold: 1
          timeoutSeconds: 15
        name: redis
        ports:
        - containerPort: 6379
          name: redis
          protocol: TCP
        readinessProbe:
          exec:
            command:
            - sh
            - -c
            - /health/redis_readiness.sh
          failureThreshold: 5
          initialDelaySeconds: 30
          periodSeconds: 15
          successThreshold: 1
          timeoutSeconds: 15
        resources:
          limits:
            cpu: 500m
            memory: 256Mi
          requests:
            cpu: 250m
            memory: 128Mi
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          runAsNonRoot: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /data
          name: data
        - mountPath: /health
          name: health
        - mountPath: /app/config/redis/tls
          name: argocd-operator-redis-tls
      - args:
        - redis-sentinel
        - /data/conf/sentinel.conf
        env:
        - name: AUTH
          valueFrom:
            secretKeyRef:
              key: admin.password
              name: openshift-gitops-redis-initial-password
        image: registry.redhat.io/rhel8/redis-6@sha256:a848cc4edb4405846c673187dd68ce66c328dd1ad42f193f5737288c7971399d
        imagePullPolicy: IfNotPresent
        livenessProbe:
          exec:
            command:
            - sh
            - -c
            - /health/sentinel_liveness.sh
          failureThreshold: 5
          initialDelaySeconds: 30
          periodSeconds: 15
          successThreshold: 1
          timeoutSeconds: 15
        name: sentinel
        ports:
        - containerPort: 26379
          name: sentinel
          protocol: TCP
        readinessProbe:
          exec:
            command:
            - sh
            - -c
            - /health/sentinel_liveness.sh
          failureThreshold: 5
          initialDelaySeconds: 30
          periodSeconds: 15
          successThreshold: 1
          timeoutSeconds: 15
        resources:
          limits:
            cpu: 500m
            memory: 256Mi
          requests:
            cpu: 250m
            memory: 128Mi
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          runAsNonRoot: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /data
          name: data
        - mountPath: /health
          name: health
        - mountPath: /app/config/redis/tls
          name: argocd-operator-redis-tls
      dnsPolicy: ClusterFirst
      initContainers:
      - args:
        - sh
        - /readonly-config/init.sh
        env:
        - name: SENTINEL_ID_0
          value: 3c0d9c0320bb34888c2df5757c718ce6ca992ce6
        - name: SENTINEL_ID_1
          value: 40000915ab58c3fa8fd888fb8b24711944e6cbb4
        - name: SENTINEL_ID_2
          value: 2bbec7894d954a8af3bb54d13eaec53cb024e2ca
        - name: AUTH
          valueFrom:
            secretKeyRef:
              key: admin.password
              name: openshift-gitops-redis-initial-password
        image: registry.redhat.io/rhel8/redis-6@sha256:a848cc4edb4405846c673187dd68ce66c328dd1ad42f193f5737288c7971399d
        imagePullPolicy: IfNotPresent
        name: config-init
        resources:
          limits:
            cpu: 500m
            memory: 256Mi
          requests:
            cpu: 250m
            memory: 128Mi
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          runAsNonRoot: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /readonly-config
          name: config
          readOnly: true
        - mountPath: /data
          name: data
        - mountPath: /app/config/redis/tls
          name: argocd-operator-redis-tls
      nodeSelector:
        kubernetes.io/os: linux
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext:
        fsGroup: 1000
        runAsNonRoot: true
        runAsUser: 1000
        seccompProfile:
          type: RuntimeDefault
      serviceAccount: openshift-gitops-argocd-redis-ha
      serviceAccountName: openshift-gitops-argocd-redis-ha
      terminationGracePeriodSeconds: 60
      volumes:
      - configMap:
          defaultMode: 420
          name: argocd-redis-ha-configmap
        name: config
      - configMap:
          defaultMode: 493
          name: argocd-redis-ha-health-configmap
        name: health
      - emptyDir: {}
        name: data
      - name: argocd-operator-redis-tls
        secret:
          defaultMode: 420
          optional: true
          secretName: argocd-operator-redis-tls
  updateStrategy:
    type: RollingUpdate
status:
  availableReplicas: 1
  collisionCount: 0
  currentReplicas: 2
  currentRevision: openshift-gitops-redis-ha-server-59996b97f7
  observedGeneration: 1
  readyReplicas: 1
  replicas: 2
  updateRevision: openshift-gitops-redis-ha-server-59996b97f7
  updatedReplicas: 2
