apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-operator
  namespace: redis-operator
  labels:
    app.kubernetes.io/name: redis-operator
    helm.sh/chart: redis-operator-0.22.2
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/instance: redis-operator
    app.kubernetes.io/version: 0.22.2
    app.kubernetes.io/component: operator
    app.kubernetes.io/part-of: redis-operator
spec:
  replicas: 2
  selector:
    matchLabels:
      name: redis-operator
  template:
    metadata:
      annotations:
        cert-manager.io/inject-ca-from: redis-operator/serving-cert
      labels:
        name: redis-operator
    spec:
      automountServiceAccountToken: true
      securityContext: {}
      containers:
        - name: "redis-operator"
          securityContext: {}
          image: "ghcr.io/ot-container-kit/redis-operator/redis-operator:v0.21.0"
          imagePullPolicy: Always
          livenessProbe:
            httpGet:
              path: /healthz
              port: probe
          readinessProbe:
            httpGet:
              path: /readyz
              port: probe
          command:
            - /operator
            - manager
          args:
            - --leader-elect
            - --metrics-bind-address=:8080
          ports:
            - containerPort: 8081
              name: probe
              protocol: TCP
            - containerPort: 8080
              name: metrics
              protocol: TCP
          env:
            - name: OPERATOR_IMAGE
              value: ghcr.io/ot-container-kit/redis-operator/redis-operator:v0.21.0
            - name: ENABLE_WEBHOOKS
              value: "false"
            - name: FEATURE_GATES
              value: "GenerateConfigInInitContainer=false"
          resources:
            limits:
              cpu: 500m
              memory: 500Mi
            requests:
              cpu: 50m
              memory: 128Mi
      serviceAccountName: "redis-operator"
      serviceAccount: "redis-operator"
