apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  namespace: example-cnf
  labels:
    control-plane: controller-manager
spec:
  selector:
    matchLabels:
      control-plane: controller-manager
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: controller-manager
        example-cnf-type: trex-operator
    spec:
      containers:
        - name: manager
          args:
            - "--enable-leader-election"
            - "--leader-election-id=trex-operator"
            - "--max-concurrent-reconciles=1"
          image: controller:latest
          imagePullPolicy: IfNotPresent
          livenessProbe:
            httpGet:
              path: /healthz
              port: 6789
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /readyz
              port: 6789
            initialDelaySeconds: 5
            periodSeconds: 10
      serviceAccountName: controller-manager
      terminationGracePeriodSeconds: 10
