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

783 commits

Author SHA1 Message Date
Aaron Crickenberger
97455b0a1b Update code-of-conduct.md
Refer to kubernetes/community as authoritative source for code of conduct
2017-12-20 14:12:51 -05:00
swatisehgal
41da99a435 Adding SR-IOV capability discovery to node-feature-discovery (#49)
* Adding SR-IOV capability discovery to node-feature-discovery

* SR-IOV capability discovery in NFD : code update after PR review
- using hostnetwork instead of volume mount in file node-feature-discovery-job.json.template
- iterating through network interfaces that are "up" in sources.go
- inserting logs in sources.go
- change in feature source name from "netid" to "network" in sources.go, README.md and main.go

*  Added code for labels sriov=true (sriov_totalvfs > 0) and sriov-configured=true (sriov_numvfs > 0)

* Code Refactored: Added Network package and network.go
2017-11-28 15:47:11 +01:00
Michał Stachowski
59b0d5000a Add support for Kubernetes 1.8+ (#82)
bump client version 5.0.2
2017-11-21 12:21:56 +01:00
Balaji Subramaniam
49f58a9c1e
Merge pull request #81 from intelsdi-x/own
Add flyingcougar in OWNERS file
2017-11-20 08:46:36 -08:00
Szymon Scharmach
def8ca93e2 Add flyingcougar in OWNERS file 2017-11-20 11:09:28 +01:00
Balaji Subramaniam
a439acb44a
Merge pull request #79 from spiffxp/assignees-to-approvers
Rename OWNERS assignees: to approvers:
2017-11-01 09:46:13 -07:00
Aaron Crickenberger
f82889bb23 Rename OWNERS assignees: to approvers:
They are effectively the same, assignees is deprecated
2017-10-31 17:52:16 -07:00
Andy Xie
0ea8ff631e refactor sources to source pkg 2017-09-05 21:35:33 -07:00
nfd-merge-bot
b34ad30ad6 Merge pull request #70 from mbssaiakhil/patch-3
Automatic merge from submit-queue

Update Community Code of Conduct
2017-08-15 09:46:19 -07:00
Malepati Bala Siva Sai Akhil
c37036a604 Update Community Code of Conduct
Update Community Code of Conduct from kubernetes/kubernetes-template-project
2017-08-15 20:22:58 +05:30
nfd-merge-bot
e8059c2f65 Merge pull request #69 from asifdxtreme/patch-2
Automatic merge from submit-queue

Fix Typo to improve GoReportCard
2017-08-14 11:26:45 -07:00
nfd-merge-bot
944ca4b5d5 Merge pull request #68 from asifdxtreme/patch-1
Automatic merge from submit-queue

Add GoReport Card Widget
2017-08-14 11:26:40 -07:00
nfd-merge-bot
124b3c43a7 Merge pull request #66 from mbssaiakhil/patch-1
Automatic merge from submit-queue

Fix Typo in Events Code of Conduct
2017-08-14 11:26:35 -07:00
nfd-merge-bot
40d8ebc683 Merge pull request #67 from mbssaiakhil/patch-2
Automatic merge from submit-queue

Fix Typo in node-feature-discovery README
2017-08-14 11:26:30 -07:00
Mohammad Asif Siddiqui
c786cd21ca Fix Typo to improve GoReportCard 2017-08-14 21:13:45 +08:00
Mohammad Asif Siddiqui
b6541ae44c Add GoReport Card Widget 2017-08-14 21:11:23 +08:00
Malepati Bala Siva Sai Akhil
aff1747816 Fix Typo in node-feature-discovery README 2017-08-14 00:46:45 +05:30
Malepati Bala Siva Sai Akhil
dd32bace93 Fix Typo in Events Code of Conduct 2017-08-14 00:44:34 +05:30
nfd-merge-bot
cac97d2e56 Merge pull request #63 from balajismaniam/improve-test-coverage
Automatic merge from submit-queue

Improved unit test coverage.

Relates to #62. Coverage is now at 64%.
- Refactored code for testing purposes.
- Misc. comment changes.
2016-12-19 14:46:23 -08:00
Balaji Subramaniam
689dfbe1c8 Improved unit test coverage.
- Refactored code for testing purposes.
- Misc. comment changes.
2016-12-19 13:54:08 -08:00
nfd-merge-bot
675d8aa24a Merge pull request #60 from balajismaniam/clean-up-rdt-helpers
Automatic merge from submit-queue

Clean-up RDT helper programs.

Manually tested.
2016-12-12 12:06:10 -08:00
Balaji Subramaniam
7ad53e38de Clean-up RDT helper programs. 2016-12-12 11:26:15 -08:00
nfd-merge-bot
e744979edb Merge pull request #59 from balajismaniam/use-exit-status-rdt-discovery
Automatic merge from submit-queue

Upated RDT Discovery() to use exit status

Fixes #42 
- Updated RDT helper programs.

Manually tested. See below.

```sh
>docker run quay.io/kubernetes_incubator/node-feature-discovery:b44b054-dirty --no-publish
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/node-feature-discovery.version = b44b054-dirty
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSSE3 = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-AESNI = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-CLMUL = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-RDSEED = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-CMOV = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-NX = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE4.1 = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE4.2 = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-AVX = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-MMX = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-MMXEXT = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE2 = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE3 = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-CX16 = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-LZCNT = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-POPCNT = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-RDRAND = true
2016/12/09 22:53:32 node.alpha.kubernetes-incubator.io/nfd-cpuid-RDTSCP = true
2016/12/09 22:53:32 support for RDT monitoring was not detected: exit status 1
2016/12/09 22:53:32 support for RDT L3 allocation was not detected: exit status 1
2016/12/09 22:53:32 support for RDT L2 allocation was not detected: exit status 1
2016/12/09 22:53:32 discovery failed for source [pstate]: can't detect whether turbo boost is enabled: open /sys/devices/system/cpu/intel_pstate/no_turbo: no such file or directory
2016/12/09 22:53:32 continuing ...
```

```sh
root@d1k8s:~/balajismaniam/node-feature-discovery# docker run quay.io/kubernetes_incubator/node-feature-discovery:eef0a6c --no-publish
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/node-feature-discovery.version = eef0a6c-dirty
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSSE3 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE4.1 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-AESNI = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-MMX = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-FMA3 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-F16C = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-BMI1 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-CMOV = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-NX = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE3 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-AVX2 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-HTT = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-ADX = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-AVX = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-RTM = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-RDTSCP = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-POPCNT = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-HLE = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-RDRAND = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE2 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-CLMUL = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-CX16 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-MMXEXT = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-SSE4.2 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-LZCNT = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-BMI2 = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-RDSEED = true
2016/12/09 22:49:37 node.alpha.kubernetes-incubator.io/nfd-cpuid-ERMS = true
2016/12/09 22:49:38 node.alpha.kubernetes-incubator.io/nfd-rdt-RDTMON = true
2016/12/09 22:49:38 node.alpha.kubernetes-incubator.io/nfd-rdt-RDTL3CA = true
2016/12/09 22:49:38 support for RDT L2 allocation was not detected: exit status 1
2016/12/09 22:49:38 node.alpha.kubernetes-incubator.io/nfd-pstate-turbo = true
```
2016-12-09 15:36:31 -08:00
Balaji Subramaniam
eef0a6c185 Upated RDT Discovery() to use exit status
- Updated RDT helper functions.
2016-12-09 14:40:45 -08:00
nfd-merge-bot
0569d224da Merge pull request #58 from balajismaniam/fix-nfd-version-suffix
Automatic merge from submit-queue

Fix to report the correct version inside container.

Fixes https://github.com/kubernetes-incubator/node-feature-discovery/issues/54. Tested manually.
- Removed demo directory from .dockerignore.
2016-12-09 14:06:30 -08:00
Balaji Subramaniam
d527d588f3 Fix to report the correct version inside container.
- Used build args to pass the correct version.
2016-12-09 13:36:15 -08:00
nfd-merge-bot
b44b0549bd Merge pull request #57 from kubernetes-incubator/milestones
Automatic merge from submit-queue

Add note about using GitHub milestones.
2016-12-08 14:46:27 -08:00
Connor Doyle
8922cb9c8e Add note about using GitHub milestones. 2016-12-08 14:21:53 -08:00
nfd-merge-bot
ffb8a4274f Merge pull request #55 from kubernetes-incubator/update-release-instrs
Automatic merge from submit-queue

Added item to update :latest tag in quay.io
2016-12-07 15:36:25 -08:00
nfd-merge-bot
674e51bc7b Merge pull request #53 from balajismaniam/update-container-tag
Automatic merge from submit-queue

Updated the container tag in the job template

- Changed container tag to v0.1.0 for the release.
2016-12-07 14:46:23 -08:00
Connor Doyle
201422953f Added item to update :latest tag in quay.io 2016-12-07 14:30:22 -08:00
Balaji Subramaniam
358d4a6405 Updated the container tag in the job template to v0.1.0 2016-12-07 14:02:25 -08:00
nfd-merge-bot
e98eb99ad3 Merge pull request #44 from balajismaniam/demo-updates
Automatic merge from submit-queue

Updated demo.

Fixes #30. 
- Updated pod templates with new label prefix.
- Minor changes to job scripts and readme.
2016-11-17 15:52:37 -08:00
Balaji Subramaniam
0d31ad8f0e Updated demo.
- Updated pod templates with new label prefix.
- Minor changes to job scripts and readme.
2016-11-17 11:15:32 -08:00
nfd-merge-bot
307348468a Merge pull request #31 from ConnorDoyle/update-namespace
Automatic merge from submit-queue

Update published label prefix.

Fixes #27.
- Changed prefix from `node.alpha.intel.com/nfd` to
  `node.alpha.kubernetes-incubator.io/nfd`
2016-11-16 08:52:47 -08:00
nfd-merge-bot
8c37ae2ee7 Merge pull request #46 from balajismaniam/enable-graceful-failure
Automatic merge from submit-queue

Enabled graceful failure if discovery for a source fails.

Fixes #37.
- Handles errors from discovery of source.
- Handles panics from discovery of source using recover().
- Added tests.

Before: 
```sh
>docker run quay.io/kubernetes_incubator/node-feature-discovery:e7f35ed --sources=cpuid,pstate,fake --no-publish
2016/11/15 22:39:55 node.alpha.intel.com/node-feature-discovery.version = e7f35ed-dirty
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-NX = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-MMX = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-SSE = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-SSE4.2 = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-RDTSCP = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-RDSEED = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-MMXEXT = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-SSE3 = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-AVX = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-LZCNT = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-POPCNT = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-CMOV = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-SSSE3 = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-AESNI = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-CLMUL = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-SSE2 = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-SSE4.1 = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-RDRAND = true
2016/11/15 22:39:55 node.alpha.intel.com/nfd-cpuid-CX16 = true
2016/11/15 22:39:55 discovery failed for source [pstate]: can't detect whether turbo boost is enabled: open /sys/devices/system/cpu/intel_pstate/no_turbo: no such file or directory
```

After:
```sh
>docker run quay.io/kubernetes_incubator/node-feature-discovery:e7f35ed-dirty --sources=cpuid,pstate,fake --no-publish
2016/11/15 22:38:55 node.alpha.intel.com/node-feature-discovery.version = e7f35ed-dirty
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-RDTSCP = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-CMOV = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-MMX = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-SSE2 = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-RDSEED = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-SSE = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-SSE4.2 = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-AESNI = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-POPCNT = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-CX16 = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-MMXEXT = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-SSSE3 = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-SSE4.1 = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-LZCNT = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-RDRAND = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-NX = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-SSE3 = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-AVX = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-cpuid-CLMUL = true
2016/11/15 22:38:55 discovery failed for source [pstate]: can't detect whether turbo boost is enabled: open /sys/devices/system/cpu/intel_pstate/no_turbo: no such file or directory
2016/11/15 22:38:55 continuing ...
2016/11/15 22:38:55 node.alpha.intel.com/nfd-fake-fakefeature1 = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-fake-fakefeature2 = true
2016/11/15 22:38:55 node.alpha.intel.com/nfd-fake-fakefeature3 = true
```
2016-11-15 16:42:45 -08:00
nfd-merge-bot
acdf1f8c3a Merge pull request #43 from ConnorDoyle/use-client-go
Automatic merge from submit-queue

[WIP] Use out-of-tree k8s go client.

Fixes #38.

Builds and tests pass, but still needs manual testing (since we don't have e2e set up yet.)

This also speeds up the build quite a bit.
2016-11-15 16:32:43 -08:00
Balaji Subramaniam
398deb7cc1 Enabled graceful failure if discovery for a source fails.
- Handles errors from discovery of source.
- Handles panics from discovery of source using recover().
- Added tests.
2016-11-15 16:24:53 -08:00
Connor Doyle
58c075c98b Use out-of-tree k8s go client. 2016-11-15 16:00:51 -08:00
nfd-merge-bot
e7f35ed85e Merge pull request #36 from IRCody/logger
Automatic merge from submit-queue

Fixes #21: Splits label/version output to stdout

Previously the output for labels/nfd version was output to stderr along with errors. This PR adds stderr/stdout loggers and outputs labels/nfd version to stdout. This doesn't change the output on the terminal but it does allow another tool to deal with stdout and errors separately. 

Before:

```
-% docker run quay.io/kubernetes_incubator/node-feature-discovery:419702fc3dc8 2> error

-% cat error                                                                                                                                                                                                                                                                                    
2016-10-28 21:26:44.023070 I | node.alpha.intel.com/node-feature-discovery.version = 769caf8-dirty
2016-10-28 21:26:44.023294 I | node.alpha.intel.com/769caf8-dirty-cpuid-SSE4.1 = true
2016-10-28 21:26:44.023330 I | node.alpha.intel.com/769caf8-dirty-cpuid-BMI1 = true
2016-10-28 21:26:44.023341 I | node.alpha.intel.com/769caf8-dirty-cpuid-CLMUL = true
2016-10-28 21:26:44.023348 I | node.alpha.intel.com/769caf8-dirty-cpuid-SSE2 = true
2016-10-28 21:26:44.023357 I | node.alpha.intel.com/769caf8-dirty-cpuid-AVX = true
2016-10-28 21:26:44.023363 I | node.alpha.intel.com/769caf8-dirty-cpuid-AVX2 = true
2016-10-28 21:26:44.023371 I | node.alpha.intel.com/769caf8-dirty-cpuid-HTT = true
2016-10-28 21:26:44.023377 I | node.alpha.intel.com/769caf8-dirty-cpuid-CMOV = true
2016-10-28 21:26:44.023387 I | node.alpha.intel.com/769caf8-dirty-cpuid-NX = true
2016-10-28 21:26:44.023399 I | node.alpha.intel.com/769caf8-dirty-cpuid-MMX = true
2016-10-28 21:26:44.023405 I | node.alpha.intel.com/769caf8-dirty-cpuid-SSE = true
2016-10-28 21:26:44.023414 I | node.alpha.intel.com/769caf8-dirty-cpuid-SSE3 = true
2016-10-28 21:26:44.023422 I | node.alpha.intel.com/769caf8-dirty-cpuid-SSE4.2 = true
2016-10-28 21:26:44.023432 I | node.alpha.intel.com/769caf8-dirty-cpuid-FMA3 = true
2016-10-28 21:26:44.023441 I | node.alpha.intel.com/769caf8-dirty-cpuid-BMI2 = true
2016-10-28 21:26:44.023451 I | node.alpha.intel.com/769caf8-dirty-cpuid-AESNI = true
2016-10-28 21:26:44.023461 I | node.alpha.intel.com/769caf8-dirty-cpuid-RDRAND = true
2016-10-28 21:26:44.023471 I | node.alpha.intel.com/769caf8-dirty-cpuid-RDTSCP = true
2016-10-28 21:26:44.023480 I | node.alpha.intel.com/769caf8-dirty-cpuid-CX16 = true
2016-10-28 21:26:44.023486 I | node.alpha.intel.com/769caf8-dirty-cpuid-MMXEXT = true
2016-10-28 21:26:44.023494 I | node.alpha.intel.com/769caf8-dirty-cpuid-SSSE3 = true
2016-10-28 21:26:44.023500 I | node.alpha.intel.com/769caf8-dirty-cpuid-F16C = true
2016-10-28 21:26:44.023510 I | node.alpha.intel.com/769caf8-dirty-cpuid-LZCNT = true
2016-10-28 21:26:44.023515 I | node.alpha.intel.com/769caf8-dirty-cpuid-POPCNT = true
2016-10-28 21:26:44.023523 I | node.alpha.intel.com/769caf8-dirty-cpuid-ERMS = true
2016-10-28 21:26:44.033911 I | node.alpha.intel.com/769caf8-dirty-rdt-RDTMON = true
2016-10-28 21:26:44.034034 I | node.alpha.intel.com/769caf8-dirty-pstate-turbo = true
2016-10-28 21:26:44.034061 I | can't get kubernetes client: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
2016-10-28 21:26:44.034069 I | failed to advertise labels: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
```

After:

```
-% docker run quay.io/kubernetes_incubator/node-feature-discovery:5927cfc0a79f 2> error
2016/10/28 21:28:00 node.alpha.intel.com/node-feature-discovery.version = be5a271-dirty
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-NX = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-SSE = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-SSE4.1 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-AVX2 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-F16C = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-BMI2 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-HTT = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-RDRAND = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-ERMS = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-CX16 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-CMOV = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-MMX = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-MMXEXT = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-SSE4.2 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-AVX = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-FMA3 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-BMI1 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-CLMUL = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-SSE2 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-SSE3 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-AESNI = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-SSSE3 = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-LZCNT = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-POPCNT = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-cpuid-RDTSCP = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-rdt-RDTMON = true
2016/10/28 21:28:00 node.alpha.intel.com/nfd-pstate-turbo = true

-% cat error
2016/10/28 21:28:00 can't get kubernetes client: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
2016/10/28 21:28:00 failed to advertise labels: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
```
2016-11-10 06:22:29 -08:00
nfd-merge-bot
82d5baadba Merge pull request #39 from IRCody/remove_labels
Automatic merge from submit-queue

Fixes #25: Deletes non-discovered nfd labels

Took a stab at #25. Appreciate any feedback.

Modifies AddLabels() to first remove any non-discovered nfd labels from
the node labels before adding newly discovered labels.

Adds tests to main_test.go to test the behavior of AddLabels.

edit:

This deletes non-discovered labels including those that may not be "discovered" because of the whitelist option. Wanted to make sure I called that out.
2016-11-03 10:02:39 -07:00
Cody Roseborough
88c15c2358 Fixes #25: Deletes non-discovered nfd labels
Adds RemoveLabels() to remove all labels from a node that contains the
supplied search string. Uses this to remove node-feature-discovery
labels prior to re-applying newly discovered labels.

This behavior applies to consecutive runs of node-feature-discovery and
whatever restrictions are placed on it. For example if a whitelist is
specified that changes the labels that are discovered, any labels that
do not match the whitelist will be removed. Adds a small note to the
readme to point out this fact.

Adds tests to main_test.go to test the behavior of AddLabels and
RemoveLabels.
2016-11-02 14:40:17 -07:00
Cody Roseborough
d940ce6e31 Fixes #21: Splits label/version output to stdout
Adds loggers for stdout/stderr and outputs labels and the version to
stdout.
2016-10-28 14:18:04 -07:00
Connor Doyle
9443bc65ab Update published label prefix.
- Changed prefix from `node.alpha.intel.com/nfd` to
  `node.alpha.kubernetes-incubator.io/nfd`
2016-10-26 15:36:12 -07:00
nfd-merge-bot
be5a271e8f Merge pull request #28 from ConnorDoyle/rm-version-from-keys
Automatic merge from submit-queue

Removed version from published label keys.

Fixes #24
2016-10-26 12:22:24 -07:00
Connor Doyle
abb5164508 Removed version from published label keys. 2016-10-26 11:26:51 -07:00
nfd-merge-bot
dfa40847b6 Merge pull request #29 from ConnorDoyle/update-readme-usage
Automatic merge from submit-queue

Updated CLI usage info in README.

Usage was amended in #20. Replaced ascii-cast w/ plain text to make this easier to keep up to date.
2016-10-26 10:22:22 -07:00
Connor Doyle
906412d961 Updated CLI usage info in README. 2016-10-25 20:05:20 -07:00
nfd-merge-bot
2e58484ea1 Merge pull request #26 from balajismaniam/fake-source
Automatic merge from submit-queue

Added fake feature source for testing purposes.

The fake source adds three fake features. I tested it manually. 

```sh
>docker run quay.io/kubernetes_incubator/node-feature-discovery:31ec894-dirty --source=fake --no-publish
2016-10-25 22:04:09.446666 I | node.alpha.intel.com/node-feature-discovery.version = 31ec894-dirty
2016-10-25 22:04:09.446939 I | node.alpha.intel.com/31ec894-dirty-fake-fakefeature1 = true
2016-10-25 22:04:09.447595 I | node.alpha.intel.com/31ec894-dirty-fake-fakefeature2 = true
2016-10-25 22:04:09.447659 I | node.alpha.intel.com/31ec894-dirty-fake-fakefeature3 = true
```
2016-10-25 15:52:20 -07:00
nfd-merge-bot
6e9cdb4a7c Merge pull request #20 from IRCody/whitelist
Automatic merge from submit-queue

Adds label-whitelist option.

The --label-whitelist option takes a regex and matches against labels.
If set, labels will only be published if they match the whitelist regex.

### No whitelist:
```
% docker run quay.io/kubernetes_incubator/node-feature-discovery:91b50e441347 --no-publish
2016-10-17 17:30:21.853659 I | node.alpha.intel.com/node-feature-discovery.version = d4eec17-dirty
2016-10-17 17:30:21.853975 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE3 = true
2016-10-17 17:30:21.853993 I | node.alpha.intel.com/d4eec17-dirty-cpuid-BMI1 = true
2016-10-17 17:30:21.854007 I | node.alpha.intel.com/d4eec17-dirty-cpuid-RDTSCP = true
2016-10-17 17:30:21.854020 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSSE3 = true
2016-10-17 17:30:21.854032 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE4.1 = true
2016-10-17 17:30:21.854045 I | node.alpha.intel.com/d4eec17-dirty-cpuid-AVX = true
2016-10-17 17:30:21.854057 I | node.alpha.intel.com/d4eec17-dirty-cpuid-F16C = true
2016-10-17 17:30:21.854071 I | node.alpha.intel.com/d4eec17-dirty-cpuid-LZCNT = true
2016-10-17 17:30:21.854083 I | node.alpha.intel.com/d4eec17-dirty-cpuid-POPCNT = true
2016-10-17 17:30:21.854096 I | node.alpha.intel.com/d4eec17-dirty-cpuid-CX16 = true
2016-10-17 17:30:21.854108 I | node.alpha.intel.com/d4eec17-dirty-cpuid-CMOV = true
2016-10-17 17:30:21.854119 I | node.alpha.intel.com/d4eec17-dirty-cpuid-NX = true
2016-10-17 17:30:21.854134 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE = true
2016-10-17 17:30:21.854146 I | node.alpha.intel.com/d4eec17-dirty-cpuid-FMA3 = true
2016-10-17 17:30:21.854158 I | node.alpha.intel.com/d4eec17-dirty-cpuid-AESNI = true
2016-10-17 17:30:21.854170 I | node.alpha.intel.com/d4eec17-dirty-cpuid-RDRAND = true
2016-10-17 17:30:21.854183 I | node.alpha.intel.com/d4eec17-dirty-cpuid-CLMUL = true
2016-10-17 17:30:21.854195 I | node.alpha.intel.com/d4eec17-dirty-cpuid-HTT = true
2016-10-17 17:30:21.854206 I | node.alpha.intel.com/d4eec17-dirty-cpuid-MMX = true
2016-10-17 17:30:21.854218 I | node.alpha.intel.com/d4eec17-dirty-cpuid-MMXEXT = true
2016-10-17 17:30:21.854230 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE2 = true
2016-10-17 17:30:21.854243 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE4.2 = true
2016-10-17 17:30:21.854256 I | node.alpha.intel.com/d4eec17-dirty-cpuid-AVX2 = true
2016-10-17 17:30:21.854268 I | node.alpha.intel.com/d4eec17-dirty-cpuid-BMI2 = true
2016-10-17 17:30:21.854281 I | node.alpha.intel.com/d4eec17-dirty-cpuid-ERMS = true
2016-10-17 17:30:21.868136 I | node.alpha.intel.com/d4eec17-dirty-rdt-RDTMON = true
2016-10-17 17:30:21.868247 I | node.alpha.intel.com/d4eec17-dirty-pstate-turbo = true
```

### ".*rdt.*"
```
% docker run quay.io/kubernetes_incubator/node-feature-discovery:91b50e441347 --no-publish --label-whitelist=".*rdt.*"
2016-10-17 17:31:37.299285 I | node.alpha.intel.com/node-feature-discovery.version = d4eec17-dirty
2016-10-17 17:31:37.313323 I | node.alpha.intel.com/d4eec17-dirty-rdt-RDTMON = true
```

### ".*(AVX|SSE|MMX).*"
```
 % docker run quay.io/kubernetes_incubator/node-feature-discovery:91b50e441347 --no-publish --label-whitelist=".*(AVX|SSE|MMX).*"
2016-10-17 17:32:36.385967 I | node.alpha.intel.com/node-feature-discovery.version = d4eec17-dirty
2016-10-17 17:32:36.386253 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE = true
2016-10-17 17:32:36.386272 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSSE3 = true
2016-10-17 17:32:36.386286 I | node.alpha.intel.com/d4eec17-dirty-cpuid-AVX = true
2016-10-17 17:32:36.386354 I | node.alpha.intel.com/d4eec17-dirty-cpuid-MMX = true
2016-10-17 17:32:36.386368 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE4.1 = true
2016-10-17 17:32:36.386410 I | node.alpha.intel.com/d4eec17-dirty-cpuid-MMXEXT = true
2016-10-17 17:32:36.386424 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE4.2 = true
2016-10-17 17:32:36.386439 I | node.alpha.intel.com/d4eec17-dirty-cpuid-AVX2 = true
2016-10-17 17:32:36.386495 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE2 = true
2016-10-17 17:32:36.386520 I | node.alpha.intel.com/d4eec17-dirty-cpuid-SSE3 = true
```
2016-10-25 15:22:48 -07:00