apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: cluster-manager
  name: cluster-manager-controller
  namespace: open-cluster-management
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cluster-manager
  template:
    metadata:
      labels:
        app: cluster-manager
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - cluster-manager
                topologyKey: failure-domain.beta.kubernetes.io/zone
              weight: 70
            - podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - cluster-manager
                topologyKey: kubernetes.io/hostname
              weight: 30
      containers:
        - args:
            - /registration-operator
            - hub
          image: quay.io/open-cluster-management/registration-operator:latest
          imagePullPolicy: IfNotPresent
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8443
              scheme: HTTPS
            initialDelaySeconds: 2
            periodSeconds: 10
          name: registration-operator
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8443
              scheme: HTTPS
            initialDelaySeconds: 2
          resources:
            requests:
              cpu: 10m
              memory: 128Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            privileged: false
            runAsNonRoot: true
      serviceAccountName: cluster-manager-service-account