apiVersion: apps/v1
kind: Deployment
metadata:
  name: cluster-manager
  namespace: open-cluster-management
spec:
  progressDeadlineSeconds: 600
  replicas: 1 #should be 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: cluster-manager
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  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: localhost:5000/open-cluster-management/registration-operator:latest
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 8443
            scheme: HTTPS
          initialDelaySeconds: 2
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: registration-operator
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 8443
            scheme: HTTPS
          initialDelaySeconds: 2
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: cluster-manager
      serviceAccountName: cluster-manager
      terminationGracePeriodSeconds: 30
