---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/version: v7.0.0
  name: minio-operator
  namespace: minio-operator
spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/instance: minio-operator
      app.kubernetes.io/name: operator
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: minio-operator
        app.kubernetes.io/name: operator
        app.kubernetes.io/version: v7.0.0
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: name
                    operator: In
                    values:
                      - minio-operator
              topologyKey: kubernetes.io/hostname
      containers:
        - args:
            - controller
          env:
            - name: OPERATOR_STS_ENABLED
              value: "on"
          image: quay.io/minio/operator:v7.0.0
          imagePullPolicy: IfNotPresent
          name: operator
          resources:
            requests:
              cpu: 200m
              ephemeral-storage: 500Mi
              memory: 256Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            runAsGroup: 1000
            runAsNonRoot: true
            runAsUser: 1000
            seccompProfile:
              type: RuntimeDefault
      securityContext:
        fsGroup: 1000
        runAsGroup: 1000
        runAsNonRoot: true
        runAsUser: 1000
      serviceAccountName: minio-operator
