apiVersion: apps/v1
kind: Deployment
metadata:
  name: nfd-operator
  namespace: REPLACE_NAMESPACE
spec:
  replicas: 1
  selector:
    matchLabels:
      name: nfd-operator
  template:
    metadata:
      labels:
        name: nfd-operator
    spec:
      serviceAccountName: nfd-operator
      containers:
        - name: nfd-operator
          # Replace this with the built image name
          image: REPLACE_IMAGE
          ports:
          - containerPort: 60000
            name: metrics
          command:
          - node-feature-discovery-operator
          imagePullPolicy: IfNotPresent
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "node-feature-discovery-operator"
            - name: NODE_FEATURE_DISCOVERY_IMAGE
              value: "k8s.gcr.io/nfd/node-feature-discovery:v0.6.0"
          securityContext:
            readOnlyRootFilesystem: true
            allowPrivilegeEscalation: false
            capabilities:
              drop: ["ALL"]
          volumeMounts:
          - mountPath: /tmp
            name: tmp
      volumes:
      - name: tmp
        emptyDir: {}
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
        - key: "node-role.kubernetes.io/master"
          operator: "Equal"
          value: ""
          effect: "NoSchedule"

