kubernetes-sigs / node-feature-discovery

Node feature discovery for Kubernetes
Apache License 2.0
725 stars 228 forks source link

nfd-master: add DisableAutoPrefix feature gate #1707

Closed marquiz closed 1 month ago

marquiz commented 1 month ago

Now that we have support for feature gates deprecate the autoDefaultNs config option of nfd-master and replace it with a new alpha feature gate DisableAutoPrefix (defaults to false). Using a feature gate to handle and communicate these kind of changes, where the default behavior is intended to be changed in a future release, feels much more natural than using random flags/options.

The combined logic of the feature gate and the config option is a logical OR over disabling auto-prefixing. That is, auto-prefixing is disabled if either the feature gate or the config options is used set to disable it:

                         | DisableAutoPrefix (feature gate)
                         | false | true
    -------------------- | --------------------------------
    autoDefaultNs   true |  ON   | OFF
    (config opt)   false |  OFF  | OFF
marquiz commented 1 month ago

/assign @ArangoGutierrez

netlify[bot] commented 1 month ago

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
Latest commit 121345472da17a48a1b29dbb0376b407d5f66939
Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/6644c0377b6ce2000826f4ad
Deploy Preview https://deploy-preview-1707--kubernetes-sigs-nfd.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

k8s-ci-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marquiz, TessaIO

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/OWNERS)~~ [marquiz] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
marquiz commented 1 month ago

Unit tests fixed /assign @TessaIO

marquiz commented 1 month ago

Fixes in documentation

TessaIO commented 1 month ago

/lgtm

k8s-ci-robot commented 1 month ago

LGTM label has been added.

Git tree hash: 184422087d1e37ee1a774d206708040bc9226bdf

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 39.85%. Comparing base (5d9266b) to head (1213454).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/kubernetes-sigs/node-feature-discovery/pull/1707/graphs/tree.svg?width=650&height=150&src=pr&token=mEZgtJQ1vg&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubernetes-sigs)](https://app.codecov.io/gh/kubernetes-sigs/node-feature-discovery/pull/1707?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubernetes-sigs) ```diff @@ Coverage Diff @@ ## master #1707 +/- ## ======================================= Coverage 39.85% 39.85% ======================================= Files 80 80 Lines 6839 6839 ======================================= Hits 2726 2726 Misses 3859 3859 Partials 254 254 ``` | [Files](https://app.codecov.io/gh/kubernetes-sigs/node-feature-discovery/pull/1707?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubernetes-sigs) | Coverage Ξ” | | |---|---|---| | [pkg/nfd-master/nfd-master.go](https://app.codecov.io/gh/kubernetes-sigs/node-feature-discovery/pull/1707?src=pr&el=tree&filepath=pkg%2Fnfd-master%2Fnfd-master.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubernetes-sigs#diff-cGtnL25mZC1tYXN0ZXIvbmZkLW1hc3Rlci5nbw==) | `41.01% <0.00%> (ΓΈ)` | |
TessaIO commented 1 month ago

/retest