# Source: olm/templates/0000_50_olm_07-olm-operator.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: olm-operator
  namespace: openshift-operator-lifecycle-manager
  labels:
    app: olm-operator
  annotations:
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
spec:
  strategy:
    type: RollingUpdate
  replicas: 1
  selector:
    matchLabels:
      app: olm-operator
  template:
    metadata:
      labels:
        app: olm-operator
    spec:
      serviceAccountName: olm-operator-serviceaccount
      priorityClassName: "system-cluster-critical"
      containers:
        - name: olm-operator
          command:
            - /bin/olm
          args:
            - --namespace
            - $(OPERATOR_NAMESPACE)
            - --writeStatusName
            - operator-lifecycle-manager
            - --writePackageServerStatusName
            - operator-lifecycle-manager-packageserver
            - --tls-cert
            - /var/run/secrets/serving-cert/tls.crt
            - --tls-key
            - /var/run/secrets/serving-cert/tls.key
          image: quay.io/operator-framework/olm@sha256:e9de77ac5c08643202ad42a0311d15c98ffbfd8a1dc2eab4e9f2dcaeed7110ac
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
            - containerPort: 8081
              name: metrics
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
          terminationMessagePolicy: FallbackToLogsOnError
          env:
            - name: RELEASE_VERSION
              value: "0.0.1-snapshot"
            - name: OPERATOR_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: OPERATOR_NAME
              value: olm-operator
          resources:
            requests:
              cpu: 10m
              memory: 160Mi
          volumeMounts:
            - mountPath: /var/run/secrets/serving-cert
              name: serving-cert
      volumes:
        - name: serving-cert
          secret:
            secretName: olm-operator-serving-cert
      nodeSelector:
        kubernetes.io/os: linux
        node-role.kubernetes.io/master: ""
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/master
          operator: Exists
        - effect: NoExecute
          key: node.kubernetes.io/unreachable
          operator: Exists
          tolerationSeconds: 120
        - effect: NoExecute
          key: node.kubernetes.io/not-ready
          operator: Exists
          tolerationSeconds: 120
