apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-operator
  namespace: redis-operator
  labels:
    control-plane: redis-operator
spec:
  selector:
    matchLabels:
      control-plane: redis-operator
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: redis-operator
    spec:
      securityContext:
        runAsUser: 65532
      containers:
      - command:
        - /manager
        args:
        - --leader-elect
        image: quay.io/opstree/redis-operator:v0.9.0
        imagePullPolicy: Always
        name: manager
        securityContext:
          allowPrivilegeEscalation: false
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 20
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
        resources:
          requests:
            cpu: 250m
            memory: 500Mi
          # limits:
          #   cpu: 500m
          #   memory: 1Gi          
      terminationGracePeriodSeconds: 10
      serviceAccount: redis-operator
      serviceAccountName: redis-operator
