Skip to content
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

Configurability via a config file and command line flags #169

Merged
merged 2 commits into from
Oct 10, 2018

Conversation

marquiz
Copy link
Contributor

@marquiz marquiz commented Sep 22, 2018

Adds support for config options that can be specified via a config file and/or the --options command line flag. This PR does not actually use (i.e. add any options) the new feature yet, but only adds the mechanism for adding config options. However, the mechanism is being used in #146 and #168, and, this PR was created to more easily review the new configurability feature separately.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 22, 2018
@marquiz marquiz force-pushed the feature/config-options branch from ee4517d to 700a90c Compare September 26, 2018 06:27
@marquiz marquiz force-pushed the feature/config-options branch 2 times, most recently from e756420 to 6e2d3e7 Compare October 3, 2018 12:50
Support yaml/json based config file for nfd. This commit does not add
any actual consumers for the config file, yet.

By default, nfd tries to read
/etc/kubernetes/node-feature-discovery/node-feature-discovery.conf.
This can be changed by specifying the --config command line flag.
Implement new '--options' command line flag that can be used to specify
config options from command line. Options specified via this command
line flag will override those read from the config file. The same format
as in the config file must be used, that is, the flag value must be
valid YAML or JSON.
@marquiz marquiz force-pushed the feature/config-options branch from 6e2d3e7 to 905c687 Compare October 5, 2018 11:01
@marquiz marquiz mentioned this pull request Oct 5, 2018
@marquiz
Copy link
Contributor Author

marquiz commented Oct 5, 2018

Pushed a new version, based on the comments in #146. Improving documentation (e.g. adding an example how to use ConfigMap), plus some code refactoring and

@marquiz
Copy link
Contributor Author

marquiz commented Oct 9, 2018

@przemek-lal any comments on this?

@przemeklal
Copy link

Looks OK to me 👍

@marquiz
Copy link
Contributor Author

marquiz commented Oct 10, 2018

/lgtm

@k8s-ci-robot
Copy link
Contributor

@marquiz: you cannot LGTM your own PR.

In response to this:

/lgtm

Instructions 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/test-infra repository.

@marquiz marquiz merged commit 244e049 into kubernetes-sigs:master Oct 10, 2018
@marquiz marquiz mentioned this pull request Dec 12, 2018
10 tasks
@marquiz marquiz deleted the feature/config-options branch March 5, 2019 09:03
ArangoGutierrez pushed a commit to ArangoGutierrez/node-feature-discovery that referenced this pull request Nov 18, 2020
Version 0.4.0

Node-feature-discovery was migrated into a new repository under the
kubernetes-sigs organization in Github (kubernetes-sigs#175). Related to the migration,
the final container image registry/repo hasn't been dediced yet (kubernetes-sigs#177) –
for this release we still use the old repo.

Major changes
- Split NFD into client and server (kubernetes-sigs#209)
- Changes in labels:
  - NFD label namespace was changed to 'feature.node.kubernetes.io/' (kubernetes-sigs#176)
    - 'nfd-' prefix was dropped from all feature labels
    - NFD version label
      (feature.node.kubernetes.io/node-feature-discovery.version) was
      replaced by an annotation (nfd.node.kubernetes.io/version)
  - network SRIOV labels were changed (kubernetes-sigs#173):
    - 'network-sriov' -> 'network-sriov.capable'
    - 'network-sriov-configured' -> 'network-sriov.configured'
  - selinux detection was moved to kernel feature source
    - 'selinux' -> 'kernel-selinux.enabled'
  - cpuid, pstate and RDT labels moved under cpu feature source (kubernetes-sigs#217)
    - 'cpuid-<cpuid flag>' -> 'cpu-cpuid.<cpuid flag>'
    - 'pstate-turbo' -> 'cpu-pstate.turbo'
    - 'rdt-<rdt feature>' -> 'cpu-rdt.<rdt feature>'
- Support for config file (kubernetes-sigs#169). Currently with three configurable
  feature sources i.e. cpu (kubernetes-sigs#224), kernel (kubernetes-sigs#157) and pci (kubernetes-sigs#168)
- Support for non-binary labels, with arbitrary values other than plain
  'true'
- PCI device detection (kubernetes-sigs#168)
- Kernel version detection (kubernetes-sigs#157)
- Kernel config option detection (kubernetes-sigs#146)
- Support for custom feature-detector hooks (kubernetes-sigs#144)
- Support OS version detection (kubernetes-sigs#149, kubernetes-sigs#211)
- Detection of hardware multithreading, such as Intel Hyper-Threading
  Technology (kubernetes-sigs#147)
- Arm64 support for CPUID detection (kubernetes-sigs#194)
- Validation of feature label names and values (kubernetes-sigs#199, kubernetes-sigs#219)
- Detection of NVDIMM devices (kubernetes-sigs#214)
- Get labels by reading from file in 'local' source (kubernetes-sigs#228)
- Detection of Intel SST-BF (Speed Select Technology - Base Frequency) (kubernetes-sigs#235)
- Make it possible to create feature labels in non-default namespace
  (kubernetes-sigs#231). Currently possible for using the local source (hooks and files).

Miscellaneous
- Template specs converted from json to yaml
- Documentation updates and fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants