1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

deployment: optional mount of /usr/src

This commit makes the mount of /usr/src optional in the Helm chart, and
removes it from the kustomization. Reason is that some systems do not
have a /usr/src (such as Talos) *and* have a R/O filesystem. Since
/usr/src is optional per FHS 3.0, NFD should not assume its presence.

Signed-off-by: Jorik Jonker <jorik@kippendief.biz>
This commit is contained in:
Jorik Jonker 2021-08-23 16:32:27 +02:00
parent a20c8872fb
commit 501ff37592
5 changed files with 9 additions and 13 deletions

View file

@ -13,9 +13,6 @@
- name: host-usr-lib
hostPath:
path: "/usr/lib"
- name: host-usr-src
hostPath:
path: "/usr/src"
- name: source-d
hostPath:
path: "/etc/kubernetes/node-feature-discovery/source.d/"
@ -41,9 +38,6 @@
- name: host-usr-lib
mountPath: "/host-usr/lib"
readOnly: true
- name: host-usr-src
mountPath: "/host-usr/src"
readOnly: true
- name: source-d
mountPath: "/etc/kubernetes/node-feature-discovery/source.d/"
readOnly: true

View file

@ -13,9 +13,6 @@
- name: host-usr-lib
hostPath:
path: "/usr/lib"
- name: host-usr-src
hostPath:
path: "/usr/src"
- name: source-d
hostPath:
path: "/etc/kubernetes/node-feature-discovery/source.d/"
@ -41,9 +38,6 @@
- name: host-usr-lib
mountPath: "/host-usr/lib"
readOnly: true
- name: host-usr-src
mountPath: "/host-usr/src"
readOnly: true
- name: source-d
mountPath: "/etc/kubernetes/node-feature-discovery/source.d/"
readOnly: true

View file

@ -12,4 +12,4 @@ keywords:
- feature-detection
- node-labels
type: application
version: 0.2.0
version: 0.2.1

View file

@ -63,9 +63,11 @@ spec:
- name: host-usr-lib
mountPath: "/host-usr/lib"
readOnly: true
{{- if .Values.worker.mountUsrSrc }}
- name: host-usr-src
mountPath: "/host-usr/src"
readOnly: true
{{- end }}
- name: source-d
mountPath: "/etc/kubernetes/node-feature-discovery/source.d/"
readOnly: true
@ -95,9 +97,11 @@ spec:
- name: host-usr-lib
hostPath:
path: "/usr/lib"
{{- if .Values.worker.mountUsrSrc }}
- name: host-usr-src
hostPath:
path: "/usr/src"
{{- end }}
- name: source-d
hostPath:
path: "/etc/kubernetes/node-feature-discovery/source.d/"

View file

@ -206,6 +206,10 @@ worker:
runAsNonRoot: true
# runAsUser: 1000
# Allow users to mount the hostPath /usr/src, useful for RHCOS on s390x
# Does not work on systems without /usr/src AND a read-only /usr, such as Talos
mountUsrSrc: false
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little