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