apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: openshift-service-ca-operator
  name: service-ca-operator
  labels:
    app: service-ca-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: service-ca-operator
  template:
    metadata:
      name: service-ca-operator
      labels:
        app: service-ca-operator
    spec:
      serviceAccountName: service-ca-operator
      containers:
      - name: service-ca-operator
        image: quay.io/openshift/origin-service-ca-operator:v4.0
        imagePullPolicy: IfNotPresent
        command: ["service-ca-operator", "operator"]
        args:
        - "--config=/var/run/configmaps/config/operator-config.yaml"
        - "-v=4"
        resources:
          requests:
            memory: 80Mi
            cpu: 10m
        env:
        - name: CONTROLLER_IMAGE
          value: quay.io/openshift/origin-service-ca-operator:v4.0
        - name: OPERATOR_IMAGE_VERSION
          value: "0.0.1-snapshot"
        volumeMounts:
        - mountPath: /var/run/configmaps/config
          name: config
        - mountPath: /var/run/secrets/serving-cert
          name: serving-cert
      volumes:
      - name: serving-cert
        secret:
          defaultMode: 400
          secretName: serving-cert
          optional: true
      - name: config
        configMap:
          defaultMode: 440
          name: service-ca-operator-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
