apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: openshift-authentication-operator
  name: authentication-operator
  labels:
    app: authentication-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: authentication-operator
  template:
    metadata:
      name: authentication-operator
      labels:
        app: authentication-operator
    spec:
      serviceAccountName: authentication-operator
      containers:
      - name: operator
        image: quay.io/openshift/origin-cluster-authentication-operator:v4.0
        imagePullPolicy: IfNotPresent
        command: ["authentication-operator", "operator"]
        args:
        - "--config=/var/run/configmaps/config/operator-config.yaml"
        - "-v=2"
        resources:
          requests:
            memory: 50Mi
            cpu: 10m
        volumeMounts:
        - mountPath: /var/run/configmaps/config
          name: config
        - mountPath: /var/run/secrets/serving-cert
          name: serving-cert
        env:
        - name: IMAGE
          value: quay.io/openshift/origin-hypershift:v4.0
        - name: OPERATOR_IMAGE_VERSION
          value: "0.0.1-snapshot"
        - name: OPERAND_IMAGE_VERSION
          value: "0.0.1-snapshot_openshift"
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        terminationMessagePolicy: FallbackToLogsOnError
      volumes:
      - name: config
        configMap:
          defaultMode: 440
          name: authentication-operator-config
      - name: serving-cert
        secret:
          secretName: serving-cert
          optional: true
      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 
