apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: openshift-service-ca
  name: apiservice-cabundle-injector
  labels:
    app: apiservice-cabundle-injector
    apiservice-cabundle-injector: "true"
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: apiservice-cabundle-injector
      apiservice-cabundle-injector: "true"
  template:
    metadata:
      name: apiservice-cabundle-injector
      labels:
        app: apiservice-cabundle-injector
        apiservice-cabundle-injector: "true"
    spec:
      serviceAccountName: apiservice-cabundle-injector-sa
      containers:
      - name: apiservice-cabundle-injector-controller
        image: ${IMAGE}
        imagePullPolicy: IfNotPresent
        command: ["service-ca-operator", "apiservice-cabundle-injector"]
        args:
        - "--config=/var/run/configmaps/config/controller-config.yaml"
        ports:
        - containerPort: 8443
        resources:
          requests:
            memory: 50Mi
            cpu: 10m
        volumeMounts:
        - mountPath: /var/run/configmaps/config
          name: config
        - mountPath: /var/run/configmaps/signing-cabundle
          name: signing-cabundle
      volumes:
      - name: signing-cabundle
        configMap:
          name: signing-cabundle
      - name: config
        configMap:
          name: apiservice-cabundle-injector-config
      nodeSelector:
        node-role.kubernetes.io/master: ""
      priorityClassName: "system-cluster-critical"
      tolerations:
      - key: node-role.kubernetes.io/master
        operator: Exists
        effect: "NoSchedule"
      - key: "node.kubernetes.io/unreachable"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
      - key: "node.kubernetes.io/not-ready"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
