apiVersion: apps/v1
kind: Deployment
metadata:
  name: node-feature-discovery-master
  namespace: node-feature-discovery
  labels:
    helm.sh/chart: node-feature-discovery-0.18.3
    app.kubernetes.io/name: node-feature-discovery
    app.kubernetes.io/instance: node-feature-discovery
    app.kubernetes.io/version: "v0.18.3"
    app.kubernetes.io/managed-by: Helm
    role: master
spec:
  replicas: 1
  revisionHistoryLimit:
  selector:
    matchLabels:
      app.kubernetes.io/name: node-feature-discovery
      app.kubernetes.io/instance: node-feature-discovery
      role: master
  template:
    metadata:
      labels:
        app.kubernetes.io/name: node-feature-discovery
        app.kubernetes.io/instance: node-feature-discovery
        role: master
      annotations:
        checksum/config: b0be1066d37d3a4f8bb03f39cdd2b6a637625f710dfec507062ad559ec43a4dc
    spec:
      dnsPolicy: ClusterFirstWithHostNet
      imagePullSecrets:
      serviceAccountName: node-feature-discovery
      enableServiceLinks: false
      securityContext: {}
      hostNetwork: false
      containers:
        - name: master
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            readOnlyRootFilesystem: true
            runAsNonRoot: true
          image: "gcr.io/k8s-staging-nfd/node-feature-discovery:v0.18.3@sha256:f9ef2ebee55141a1758d3c0a87bb701f5db2adf6856f7218b11bc2bac7b63862"
          imagePullPolicy: IfNotPresent
          startupProbe:
            httpGet:
              path: /healthz
              port: http
            failureThreshold: 30
          livenessProbe:
            httpGet:
              path: /healthz
              port: http
          readinessProbe:
            httpGet:
              path: /healthz
              port: http
            failureThreshold: 10
          ports:
            - containerPort: 8080
              name: http
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
          command:
            - "nfd-master"
          resources:
            limits: {}
            requests:
              cpu: 10m
              memory: 20Mi
          args:
            - "-enable-leader-election"
            - "-feature-gates=NodeFeatureGroupAPI=true"
            - "-port=8080"
          volumeMounts:
            - name: nfd-master-conf
              mountPath: "/etc/kubernetes/node-feature-discovery"
              readOnly: true
      volumes:
        - name: nfd-master-conf
          configMap:
            name: node-feature-discovery-master-conf
            items:
              - key: nfd-master.conf
                path: nfd-master.conf
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - preference:
                matchExpressions:
                  - key: node-role.kubernetes.io/control-plane
                    operator: In
                    values:
                      - ""
              weight: 1
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/control-plane
          operator: Exists
