---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  namespace: system
  labels:
    control-plane: capdo-controller-manager
spec:
  selector:
    matchLabels:
      control-plane: capdo-controller-manager
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: capdo-controller-manager
      annotations:
        kubectl.kubernetes.io/default-container: manager
    spec:
      serviceAccountName: manager
      containers:
      - args:
        - --enable-leader-election
        - --metrics-addr=127.0.0.1:8080
        image: controller:latest
        imagePullPolicy: Always
        name: manager
        ports:
        - containerPort: 9440
          name: healthz
          protocol: TCP
        readinessProbe:
          httpGet:
            path: /readyz
            port: healthz
        livenessProbe:
          httpGet:
            path: /healthz
            port: healthz
      terminationGracePeriodSeconds: 10
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/master
