apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio-operator
  namespace: minio-operator
spec:
  replicas: 2
  selector:
    matchLabels:
      name: minio-operator
  template:
    metadata:
      labels:
        name: minio-operator
    spec:
      serviceAccountName: minio-operator
      containers:
        - name: minio-operator
          image: minio/operator:dev
          imagePullPolicy: IfNotPresent
          securityContext:
            runAsUser: 1000
            runAsGroup: 1000
            runAsNonRoot: true
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: name
                    operator: In
                    values:
                      - minio-operator
              topologyKey: kubernetes.io/hostname
