2018-09-27 11:54:45 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
|
|
|
labels:
|
2019-01-11 13:55:28 +00:00
|
|
|
app: nfd-worker
|
|
|
|
name: nfd-worker
|
2019-05-28 14:13:52 +00:00
|
|
|
namespace: node-feature-discovery
|
2018-09-27 11:54:45 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2019-01-11 13:55:28 +00:00
|
|
|
app: nfd-worker
|
2018-09-27 11:54:45 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2019-01-11 13:55:28 +00:00
|
|
|
app: nfd-worker
|
2018-09-27 11:54:45 +00:00
|
|
|
spec:
|
2019-01-29 14:21:48 +00:00
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
2018-09-27 11:54:45 +00:00
|
|
|
containers:
|
|
|
|
- env:
|
|
|
|
- name: NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2020-10-08 17:23:43 +00:00
|
|
|
image: gcr.io/k8s-staging-nfd/node-feature-discovery:master
|
2019-01-11 13:55:28 +00:00
|
|
|
name: nfd-worker
|
2020-05-28 12:16:15 +00:00
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
|
|
|
capabilities:
|
|
|
|
drop: ["ALL"]
|
|
|
|
readOnlyRootFilesystem: true
|
|
|
|
runAsNonRoot: true
|
2019-01-11 13:55:28 +00:00
|
|
|
command:
|
|
|
|
- "nfd-worker"
|
2018-09-27 11:54:45 +00:00
|
|
|
args:
|
|
|
|
- "--sleep-interval=60s"
|
2019-01-29 14:21:48 +00:00
|
|
|
- "--server=nfd-master:8080"
|
2019-02-01 12:04:59 +00:00
|
|
|
## Enable TLS authentication (1/3)
|
|
|
|
## The example below assumes having the root certificate named ca.crt stored in
|
|
|
|
## a ConfigMap named nfd-ca-cert, and, the TLS authentication credentials stored
|
|
|
|
## in a TLS Secret named nfd-worker-cert
|
|
|
|
# - "--ca-file=/etc/kubernetes/node-feature-discovery/trust/ca.crt"
|
|
|
|
# - "--key-file=/etc/kubernetes/node-feature-discovery/certs/tls.key"
|
|
|
|
# - "--cert-file=/etc/kubernetes/node-feature-discovery/certs/tls.crt"
|
2018-09-27 11:54:45 +00:00
|
|
|
volumeMounts:
|
2018-07-05 13:29:38 +00:00
|
|
|
- name: host-boot
|
|
|
|
mountPath: "/host-boot"
|
|
|
|
readOnly: true
|
2018-07-10 09:00:02 +00:00
|
|
|
- name: host-os-release
|
|
|
|
mountPath: "/host-etc/os-release"
|
|
|
|
readOnly: true
|
2018-09-27 11:54:45 +00:00
|
|
|
- name: host-sys
|
|
|
|
mountPath: "/host-sys"
|
2019-04-20 00:21:38 +00:00
|
|
|
- name: source-d
|
|
|
|
mountPath: "/etc/kubernetes/node-feature-discovery/source.d/"
|
|
|
|
- name: features-d
|
|
|
|
mountPath: "/etc/kubernetes/node-feature-discovery/features.d/"
|
2019-02-01 12:04:59 +00:00
|
|
|
## Enable TLS authentication (2/3)
|
|
|
|
# - name: nfd-ca-cert
|
|
|
|
# mountPath: "/etc/kubernetes/node-feature-discovery/trust"
|
|
|
|
# readOnly: true
|
|
|
|
# - name: nfd-worker-cert
|
|
|
|
# mountPath: "/etc/kubernetes/node-feature-discovery/certs"
|
|
|
|
# readOnly: true
|
2018-09-27 11:54:45 +00:00
|
|
|
volumes:
|
2018-07-05 13:29:38 +00:00
|
|
|
- name: host-boot
|
|
|
|
hostPath:
|
|
|
|
path: "/boot"
|
2018-07-10 09:00:02 +00:00
|
|
|
- name: host-os-release
|
|
|
|
hostPath:
|
|
|
|
path: "/etc/os-release"
|
2018-09-27 11:54:45 +00:00
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: "/sys"
|
2019-04-20 00:21:38 +00:00
|
|
|
- name: source-d
|
|
|
|
hostPath:
|
|
|
|
path: "/etc/kubernetes/node-feature-discovery/source.d/"
|
|
|
|
- name: features-d
|
|
|
|
hostPath:
|
|
|
|
path: "/etc/kubernetes/node-feature-discovery/features.d/"
|
2019-02-01 12:04:59 +00:00
|
|
|
## Enable TLS authentication (3/3)
|
|
|
|
# - name: nfd-ca-cert
|
|
|
|
# configMap:
|
|
|
|
# name: nfd-ca-cert
|
|
|
|
# - name: nfd-worker-cert
|
|
|
|
# secret:
|
|
|
|
# secretName: nfd-worker-cert
|