apiVersion: apps/v1
kind: Deployment
metadata:
  name: pod-checkpointer-operator
  namespace: openshift-pod-checkpointer
spec:
  replicas: 1
  selector:
    matchLabels:
      name: pod-checkpointer-operator
      namespace: openshift-pod-checkpointer
  template:
    metadata:
      labels:
        name: pod-checkpointer-operator
        namespace: openshift-pod-checkpointer
    spec:
      serviceAccountName: pod-checkpointer-operator
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
        - key: node-role.kubernetes.io/master
          operator: Exists
          effect: NoSchedule
      containers:
        - name: pod-checkpointer-operator
          image: openshift/pod-checkpointer-operator:latest
          ports:
            - containerPort: 60000
              name: metrics
          command:
            - pod-checkpointer-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: OPERATOR_NAME
              value: "pod-checkpointer-operator"
