-
Notifications
You must be signed in to change notification settings - Fork 297
feat(helm): Allow control of hostUsers #2411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hi @jcpunk. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jcpunk The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-sigs-nfd ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for controlling the hostUsers field in Kubernetes pod specifications across all NFD components (master, worker, topology updater, and garbage collector). The hostUsers field is a Kubernetes feature that allows users to control whether containers should use host user IDs, and is particularly important when hostNetwork is enabled.
Changes:
- Added
hostUsersconfiguration option to master, worker, topologyUpdater, and gc components - Updated Helm templates to conditionally render the
hostUsersfield when set to a boolean value - Updated JSON schema validation and documentation
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| deployment/helm/node-feature-discovery/values.yaml | Added hostUsers configuration field with default NULL value for all four components |
| deployment/helm/node-feature-discovery/templates/master.yaml | Added conditional rendering of hostUsers field in pod spec |
| deployment/helm/node-feature-discovery/templates/worker.yaml | Added conditional rendering of hostUsers field in pod spec |
| deployment/helm/node-feature-discovery/templates/topologyupdater.yaml | Added conditional rendering of hostUsers field in pod spec |
| deployment/helm/node-feature-discovery/templates/nfd-gc.yaml | Added conditional rendering of hostUsers field in pod spec |
| deployment/helm/node-feature-discovery/values.schema.json | Added schema validation for hostUsers as boolean or null type |
| deployment/helm/node-feature-discovery/README.md | Auto-generated documentation update for new hostUsers parameter |
| docs/deployment/helm.md | Auto-generated documentation update for new hostUsers parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # @schema type: [boolean, null] | ||
| # -- Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | ||
| # @section -- NFD-Topology-Updater | ||
| hostUsers: NULL |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value NULL is not a valid YAML null value. In YAML, null values should be represented either by omitting the value entirely (e.g., hostUsers:) or using lowercase null. The uppercase NULL will be treated as a string literal, not a null value. This should be changed to an empty value like other similar fields in this file (e.g., tag:, instance:, resyncPeriod:, nfdApiParallelism:).
| hostUsers: NULL | |
| hostUsers: |
| # @schema type: [boolean, null] | ||
| # -- Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | ||
| # @section -- NFD-GC | ||
| hostUsers: NULL |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value NULL is not a valid YAML null value. In YAML, null values should be represented either by omitting the value entirely (e.g., hostUsers:) or using lowercase null. The uppercase NULL will be treated as a string literal, not a null value. This should be changed to an empty value like other similar fields in this file (e.g., tag:, instance:, resyncPeriod:, nfdApiParallelism:).
| hostUsers: NULL | |
| hostUsers: |
| # @schema type: [boolean, null] | ||
| # -- Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | ||
| # @section -- NFD-Master | ||
| hostUsers: NULL |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value NULL is not a valid YAML null value. In YAML, null values should be represented either by omitting the value entirely (e.g., hostUsers:) or using lowercase null. The uppercase NULL will be treated as a string literal, not a null value. This should be changed to an empty value like other similar fields in this file (e.g., tag:, instance:, resyncPeriod:, nfdApiParallelism:).
| hostUsers: NULL | |
| hostUsers: |
| # @schema type: [boolean, null] | ||
| # -- Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | ||
| # @section -- NFD-Worker | ||
| hostUsers: NULL |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value NULL is not a valid YAML null value. In YAML, null values should be represented either by omitting the value entirely (e.g., hostUsers:) or using lowercase null. The uppercase NULL will be treated as a string literal, not a null value. This should be changed to an empty value like other similar fields in this file (e.g., tag:, instance:, resyncPeriod:, nfdApiParallelism:).
| hostUsers: NULL | |
| hostUsers: |
| | 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. | | ||
| | master.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-master container. | | ||
| | master.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | master.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you say string but declare the var as a bool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is a byproduct of me using NULL instead of null... I'll see about fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, not sure why this is getting picked up as string by the helm schema but not the doc generation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marquiz any advice here?
| # @schema type: [boolean, null] | ||
| # -- Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | ||
| # @section -- NFD-Master | ||
| hostUsers: NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be false instead of NULL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string false will opt into user namespaces. For folks on kubernetes 1.32 and earlier, if they don't have the right feature flags enabled, having hostUsers set could cause scheduling issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | 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. | | ||
| | master.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-master container. | | ||
| | master.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | master.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type column shows "string" but the actual type according to the schema (values.schema.json) is boolean or null. This is misleading to users. The Type should be "bool" to match the actual Kubernetes API field type for hostUsers, which is a boolean field in PodSpec.
| | master.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | | |
| | master.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
| | 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. | | ||
| | worker.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-worker container. | | ||
| | worker.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | worker.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type column shows "string" but the actual type according to the schema (values.schema.json) is boolean or null. This is misleading to users. The Type should be "bool" to match the actual Kubernetes API field type for hostUsers, which is a boolean field in PodSpec.
| | worker.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | | |
| | worker.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
| | 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. | | ||
| | topologyUpdater.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-topology-updater container. | | ||
| | topologyUpdater.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | topologyUpdater.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type column shows "string" but the actual type according to the schema (values.schema.json) is boolean or null. This is misleading to users. The Type should be "bool" to match the actual Kubernetes API field type for hostUsers, which is a boolean field in PodSpec.
| | topologyUpdater.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | | |
| | topologyUpdater.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
| | 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. | | ||
| | gc.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-gc container. | | ||
| | gc.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | gc.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type column shows "string" but the actual type according to the schema (values.schema.json) is boolean or null. This is misleading to users. The Type should be "bool" to match the actual Kubernetes API field type for hostUsers, which is a boolean field in PodSpec.
| | gc.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | | |
| | gc.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
| | 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. | | ||
| | master.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-master container. | | ||
| | master.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | master.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type column shows "string" but the actual type according to the schema (values.schema.json) is boolean or null. This is misleading to users. The Type should be "bool" to match the actual Kubernetes API field type for hostUsers, which is a boolean field in PodSpec.
| | master.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | | |
| | master.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
| | 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. | | ||
| | worker.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-worker container. | | ||
| | worker.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | worker.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type column shows "string" but the actual type according to the schema (values.schema.json) is boolean or null. This is misleading to users. The Type should be "bool" to match the actual Kubernetes API field type for hostUsers, which is a boolean field in PodSpec.
| | worker.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | | |
| | worker.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
| | 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. | | ||
| | topologyUpdater.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-topology-updater container. | | ||
| | topologyUpdater.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | topologyUpdater.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type column shows "string" but the actual type according to the schema (values.schema.json) is boolean or null. This is misleading to users. The Type should be "bool" to match the actual Kubernetes API field type for hostUsers, which is a boolean field in PodSpec.
| | topologyUpdater.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | | |
| | topologyUpdater.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
| | 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. | | ||
| | gc.extraEnvs | list | `[]` | Additional environment variables to set in the nfd-gc container. | | ||
| | gc.hostNetwork | bool | `false` | Run the container in the host's network namespace. | | ||
| | gc.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type column shows "string" but the actual type according to the schema (values.schema.json) is boolean or null. This is misleading to users. The Type should be "bool" to match the actual Kubernetes API field type for hostUsers, which is a boolean field in PodSpec.
| | gc.hostUsers | string | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | | |
| | gc.hostUsers | bool | `nil` | Run the container with host user ids. NOTE: if hostNetwork is true, hostUsers should be true. | |
Fixes: kubernetes-sigs#2397 Signed-off-by: Pat Riehecky <[email protected]>
By default this will render nothing, so folks without the feature gate should see no changes.
Fixes: #2397