Skip to content

Commit de5d56e

Browse files
authored
Merge pull request #2411 from jcpunk/hostUsers
feat(helm): Allow control of hostUsers
2 parents 13cf6c7 + 8fba383 commit de5d56e

File tree

8 files changed

+64
-0
lines changed

8 files changed

+64
-0
lines changed

deployment/helm/node-feature-discovery/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ NFD.
175175
| master.extraArgs | list | `[]` | Additional [command line arguments](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/master-commandline-reference) to pass to nfd-master. |
176176
| master.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-master container. |
177177
| master.hostNetwork | bool | `false` | Run the container in the host's network namespace. |
178+
| master.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. |
178179
| master.dnsPolicy | string | `"ClusterFirstWithHostNet"` | NFD master pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). |
179180
| master.config | string | `nil` | NFD master [configuration](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/master-configuration-reference). |
180181
| master.port | int | `8080` | Port on which to serve http for metrics and healthz endpoints. |
@@ -231,6 +232,7 @@ NFD.
231232
| worker.extraArgs | list | `[]` | Additional [command line arguments](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/worker-commandline-reference) to pass to nfd-worker. |
232233
| worker.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-worker container. |
233234
| worker.hostNetwork | bool | `false` | Run the container in the host's network namespace. |
235+
| worker.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. |
234236
| worker.dnsPolicy | string | `"ClusterFirstWithHostNet"` | NFD worker pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-policy). |
235237
| worker.config | string | `nil` | NFD worker [configuration](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/worker-configuration-reference). |
236238
| worker.port | int | `8080` | Port on which to serve http for metrics and healthz endpoints. |
@@ -277,6 +279,7 @@ NFD.
277279
| topologyUpdater.extraArgs | list | `[]` | Additional [command line arguments](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/topology-updater-commandline-reference) to pass to nfd-topology-updater. |
278280
| topologyUpdater.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-topology-updater container. |
279281
| topologyUpdater.hostNetwork | bool | `false` | Run the container in the host's network namespace. |
282+
| topologyUpdater.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. |
280283
| topologyUpdater.dnsPolicy | string | `"ClusterFirstWithHostNet"` | NFD topology updater pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-policy). |
281284
| topologyUpdater.serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
282285
| topologyUpdater.serviceAccount.annotations | object | `{}` | [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations) to add to the service account. |
@@ -323,6 +326,7 @@ NFD.
323326
| gc.extraArgs | list | `[]` | Additional [command line arguments](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/gc-commandline-reference) to pass to nfd-gc. |
324327
| gc.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-gc container. |
325328
| gc.hostNetwork | bool | `false` | Run the container in the host's network namespace. |
329+
| gc.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. |
326330
| gc.replicaCount | int | `1` | The number of desired replicas for the nfd-gc Deployment. |
327331
| gc.dnsPolicy | string | `"ClusterFirstWithHostNet"` | NFD gc pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-policy). |
328332
| gc.serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |

deployment/helm/node-feature-discovery/templates/master.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
securityContext:
4343
{{- toYaml .Values.master.podSecurityContext | nindent 8 }}
4444
hostNetwork: {{ .Values.master.hostNetwork }}
45+
{{- if kindIs "bool" .Values.master.hostUsers }}
46+
hostUsers: {{ .Values.master.hostUsers }}
47+
{{- end }}
4548
containers:
4649
- name: master
4750
securityContext:

deployment/helm/node-feature-discovery/templates/nfd-gc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ spec:
4040
securityContext:
4141
{{- toYaml .Values.gc.podSecurityContext | nindent 8 }}
4242
hostNetwork: {{ .Values.gc.hostNetwork }}
43+
{{- if kindIs "bool" .Values.gc.hostUsers }}
44+
hostUsers: {{ .Values.gc.hostUsers }}
45+
{{- end }}
4346
containers:
4447
- name: gc
4548
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

deployment/helm/node-feature-discovery/templates/topologyupdater.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ spec:
4040
securityContext:
4141
{{- toYaml .Values.topologyUpdater.podSecurityContext | nindent 8 }}
4242
hostNetwork: {{ .Values.topologyUpdater.hostNetwork }}
43+
{{- if kindIs "bool" .Values.topologyUpdater.hostUsers }}
44+
hostUsers: {{ .Values.topologyUpdater.hostUsers }}
45+
{{- end }}
4346
containers:
4447
- name: topology-updater
4548
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

deployment/helm/node-feature-discovery/templates/worker.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ spec:
4444
securityContext:
4545
{{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
4646
hostNetwork: {{ .Values.worker.hostNetwork }}
47+
{{- if kindIs "bool" .Values.worker.hostUsers }}
48+
hostUsers: {{ .Values.worker.hostUsers }}
49+
{{- end }}
4750
containers:
4851
- name: worker
4952
securityContext:

deployment/helm/node-feature-discovery/values.schema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
"description": "Run the container in the host's network namespace.",
5656
"type": "boolean"
5757
},
58+
"hostUsers": {
59+
"description": "Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true.",
60+
"type": [
61+
"boolean",
62+
"null"
63+
]
64+
},
5865
"interval": {
5966
"description": "Time between periodic garbage collector runs.",
6067
"type": "string"
@@ -353,6 +360,13 @@
353360
"description": "Run the container in the host's network namespace.",
354361
"type": "boolean"
355362
},
363+
"hostUsers": {
364+
"description": "Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true.",
365+
"type": [
366+
"boolean",
367+
"null"
368+
]
369+
},
356370
"instance": {
357371
"description": "Instance name. Used to separate annotation namespaces for multiple parallel deployments.",
358372
"type": [
@@ -695,6 +709,13 @@
695709
"description": "Run the container in the host's network namespace.",
696710
"type": "boolean"
697711
},
712+
"hostUsers": {
713+
"description": "Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true.",
714+
"type": [
715+
"boolean",
716+
"null"
717+
]
718+
},
698719
"kubeletConfigPath": {
699720
"description": "Host path for the kubelet config file.",
700721
"type": [
@@ -953,6 +974,13 @@
953974
"description": "Run the container in the host's network namespace.",
954975
"type": "boolean"
955976
},
977+
"hostUsers": {
978+
"description": "Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true.",
979+
"type": [
980+
"boolean",
981+
"null"
982+
]
983+
},
956984
"labels": {
957985
"description": "[Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to add to the nfd-worker pods.",
958986
"$ref": "#/$defs/_definitions.json/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/labels",

deployment/helm/node-feature-discovery/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ master:
6565
# -- Run the container in the host's network namespace.
6666
# @section -- NFD-Master
6767
hostNetwork: false
68+
# @schema type: [boolean, null]
69+
# -- (bool) Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true.
70+
# @section -- NFD-Master
71+
hostUsers: ~ # @schema type: [boolean, null]
6872
# @enum: [Default, ClusterFirst, ClusterFirstWithHostNet, None]
6973
# -- NFD master pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy).
7074
# @section -- NFD-Master
@@ -370,6 +374,10 @@ worker:
370374
# -- Run the container in the host's network namespace.
371375
# @section -- NFD-Worker
372376
hostNetwork: false
377+
# @schema type: [boolean, null]
378+
# -- (bool) Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true.
379+
# @section -- NFD-Worker
380+
hostUsers: ~ # @schema type: [boolean, null]
373381
# @enum: [Default, ClusterFirst, ClusterFirstWithHostNet, None]
374382
# -- NFD worker pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-policy).
375383
# @section -- NFD-Worker
@@ -824,6 +832,10 @@ topologyUpdater:
824832
# -- Run the container in the host's network namespace.
825833
# @section -- NFD-Topology-Updater
826834
hostNetwork: false
835+
# @schema type: [boolean, null]
836+
# -- (bool) Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true.
837+
# @section -- NFD-Topology-Updater
838+
hostUsers: ~ # @schema type: [boolean, null]
827839
# @enum: [Default, ClusterFirst, ClusterFirstWithHostNet, None]
828840
# -- NFD topology updater pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-policy).
829841
# @section -- NFD-Topology-Updater
@@ -1020,6 +1032,10 @@ gc:
10201032
# -- Run the container in the host's network namespace.
10211033
# @section -- NFD-GC
10221034
hostNetwork: false
1035+
# @schema type: [boolean, null]
1036+
# -- (bool) Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true.
1037+
# @section -- NFD-GC
1038+
hostUsers: ~ # @schema type: [boolean, null]
10231039
# -- The number of desired replicas for the nfd-gc Deployment.
10241040
# @section -- NFD-GC
10251041
replicaCount: 1

docs/deployment/helm.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ NFD.
193193
| master.extraArgs | list | `[]` | Additional [command line arguments](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/master-commandline-reference) to pass to nfd-master. |
194194
| master.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-master container. |
195195
| master.hostNetwork | bool | `false` | Run the container in the host's network namespace. |
196+
| master.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. |
196197
| master.dnsPolicy | string | `"ClusterFirstWithHostNet"` | NFD master pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). |
197198
| master.config | string | `nil` | NFD master [configuration](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/master-configuration-reference). |
198199
| master.port | int | `8080` | Port on which to serve http for metrics and healthz endpoints. |
@@ -249,6 +250,7 @@ NFD.
249250
| worker.extraArgs | list | `[]` | Additional [command line arguments](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/worker-commandline-reference) to pass to nfd-worker. |
250251
| worker.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-worker container. |
251252
| worker.hostNetwork | bool | `false` | Run the container in the host's network namespace. |
253+
| worker.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. |
252254
| worker.dnsPolicy | string | `"ClusterFirstWithHostNet"` | NFD worker pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-policy). |
253255
| worker.config | string | `nil` | NFD worker [configuration](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/worker-configuration-reference). |
254256
| worker.port | int | `8080` | Port on which to serve http for metrics and healthz endpoints. |
@@ -295,6 +297,7 @@ NFD.
295297
| topologyUpdater.extraArgs | list | `[]` | Additional [command line arguments](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/topology-updater-commandline-reference) to pass to nfd-topology-updater. |
296298
| topologyUpdater.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-topology-updater container. |
297299
| topologyUpdater.hostNetwork | bool | `false` | Run the container in the host's network namespace. |
300+
| topologyUpdater.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. |
298301
| topologyUpdater.dnsPolicy | string | `"ClusterFirstWithHostNet"` | NFD topology updater pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-policy). |
299302
| topologyUpdater.serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
300303
| topologyUpdater.serviceAccount.annotations | object | `{}` | [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations) to add to the service account. |
@@ -341,6 +344,7 @@ NFD.
341344
| gc.extraArgs | list | `[]` | Additional [command line arguments](https://kubernetes-sigs.github.io/node-feature-discovery/master/reference/gc-commandline-reference) to pass to nfd-gc. |
342345
| gc.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-gc container. |
343346
| gc.hostNetwork | bool | `false` | Run the container in the host's network namespace. |
347+
| gc.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. |
344348
| gc.replicaCount | int | `1` | The number of desired replicas for the nfd-gc Deployment. |
345349
| gc.dnsPolicy | string | `"ClusterFirstWithHostNet"` | NFD gc pod [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-policy). |
346350
| gc.serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |

0 commit comments

Comments
 (0)