mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-15 04:57:56 +00:00
Implement new 'system' feature source. It now detects OS release information from the os-release file, assumed to be available at /host-etc/os-release. It currently creates two labels (assuming that the corresponding fields are found in the os-release file), with example values: feature.node.kubernetes.io/system-os_release.ID=opensuse feature.node.kubernetes.io/system-os_release.VERSION_ID=42.3 Also, update the template spec to mount /etc/os-release file from the host inside the container.
46 lines
1.2 KiB
Text
46 lines
1.2 KiB
Text
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
labels:
|
|
app: node-feature-discovery
|
|
name: node-feature-discovery
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: node-feature-discovery
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: node-feature-discovery
|
|
spec:
|
|
hostNetwork: true
|
|
serviceAccount: node-feature-discovery
|
|
containers:
|
|
- env:
|
|
- name: NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
image: quay.io/kubernetes_incubator/node-feature-discovery:v0.3.0
|
|
name: node-feature-discovery
|
|
args:
|
|
- "--sleep-interval=60s"
|
|
volumeMounts:
|
|
- name: host-boot
|
|
mountPath: "/host-boot"
|
|
readOnly: true
|
|
- name: host-os-release
|
|
mountPath: "/host-etc/os-release"
|
|
readOnly: true
|
|
- name: host-sys
|
|
mountPath: "/host-sys"
|
|
volumes:
|
|
- name: host-boot
|
|
hostPath:
|
|
path: "/boot"
|
|
- name: host-os-release
|
|
hostPath:
|
|
path: "/etc/os-release"
|
|
- name: host-sys
|
|
hostPath:
|
|
path: "/sys"
|