---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cluster-capi-operator
  namespace: openshift-cluster-api
  annotations:
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
    exclude.release.openshift.io/internal-openshift-hosted: "true"
    release.openshift.io/feature-gate: "TechPreviewNoUpgrade"
  labels:
    k8s-app: cluster-capi-operator
spec:
  selector:
    matchLabels:
      k8s-app: cluster-capi-operator
  replicas: 1
  template:
    metadata:
      annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
      labels:
        k8s-app: cluster-capi-operator
    spec:
      serviceAccountName: cluster-capi-operator
      containers:
      - name: cluster-capi-operator
        image: registry.ci.openshift.org/openshift:cluster-capi-operator
        command:
        - ./cluster-capi-operator
        env:
        - name: RELEASE_VERSION
          value: "0.0.1-snapshot"
        resources:
          requests:
            cpu: 10m
            memory: 50Mi
        volumeMounts:
        - name: images
          mountPath: /etc/cluster-api-config/
      nodeSelector:
        node-role.kubernetes.io/master: ""
      priorityClassName: system-node-critical
      restartPolicy: Always
      tolerations:
      - key: "node-role.kubernetes.io/master"
        operator: "Exists"
        effect: "NoSchedule"
      volumes:
      - name: images
        configMap:
          defaultMode: 420
          name: cluster-capi-operator-images
