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

297 commits

Author SHA1 Message Date
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
Balaji Subramaniam
af0f97dcef Added fake feature source for testing purposes. 2016-10-25 14:57:40 -07:00
Cody Roseborough
769caf8f45 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.
2016-10-17 11:31:35 -07:00
nfd-merge-bot
31ec89474a Merge pull request #19 from balajismaniam/host-demo-input-data-in-s3
Automatic merge from submit-queue

Hosted demo input data for parsec in S3.
2016-10-12 13:52:05 -07:00
Balaji Subramaniam
9f80dbdddf Hosted demo input data for parsec in S3.
- Updated the demo dockerfile for parsec appropriately.
2016-10-12 10:57:55 -07:00
Balaji Subramaniam
476e889552 Updated demo.
- Hosted demo images in quay.io.
- Added dockerfiles for the demo images.
- Updated readme appropriately.
2016-10-09 20:28:57 -07:00
Balaji Subramaniam
320845f8dd Added demo.
- Added helper scripts for running the apps.
- Added templates to express affinity and anti-affinity.
- Updated/Added readme appropriately.
- Added asciicast where appropriate.
2016-09-30 13:10:05 -07:00
Balaji Subramaniam
41abde10b3 Integrated with travis-ci. (#15)
- Added .travis.yml.
- Updated readme to show build status.
2016-09-23 14:08:03 -07:00
Connor Doyle
532ea86bfc Merge pull request #13 from balajismaniam/fix-image-vulnerabilites
Fixed vulnerabilities in Docker image.
2016-09-20 17:06:38 -07:00
Balaji Subramaniam
e373c658f5 Fixed vulnerabilities in Docker image.
- Updated to debian testing (stretch).
- Updated to go v1.7.
- Added .dockerignore file.
2016-09-20 10:49:52 -07:00
Balaji Subramaniam
5d43beefcc Merge pull request #12 from kubernetes-incubator/id-users
Ask users to identify themselves per grad reqs.
2016-09-19 17:31:26 -07:00
Connor Doyle
132d9abdd3 Ask users to identify themselves per grad reqs. 2016-09-19 17:12:54 -07:00
Balaji Subramaniam
6498c4b381 Merge pull request #11 from kubernetes-incubator/release-process-update
Adds more specific instructions for releasing.
2016-09-15 17:20:42 -07:00
Connor Doyle
aab9017801 Adds more specific instructions for releasing. 2016-09-15 11:28:34 -07:00
Connor Doyle
7ae49a235d Merge pull request #9 from balajismaniam/host-image-in-quay
Hosted docker image in quay.io.
2016-09-06 10:15:56 -07:00
Balaji Subramaniam
9e37744d5c Hosted docker image in quay.io.
- Updated makefile, job template and readme.
2016-09-02 16:04:04 -07:00
Connor Doyle
811fd16061 Merge pull request #8 from philips/incubator-stuff
README: add a kubernetes incubator section
2016-08-31 14:05:45 -07:00
Brandon Philips
f76113c2d3 README: add a kubernetes incubator section 2016-08-31 13:19:42 -07:00
Connor Doyle
28a2ec2052 Merge pull request #3 from ConnorDoyle/replay-history
Replayed history.
2016-08-31 12:16:12 -07:00
Connor Doyle
570d1ae5be Replayed commit history. 2016-08-31 11:44:06 -07:00
Balaji Subramaniam
d5a9c621f9 Added tests.
- Updated mock tests.
- Refactored to get more coverage.
- Minor changes to normalize error reporting.
2016-08-30 14:42:59 -07:00
Connor Doyle
e79ffd2c2a Refactored feature sources.
- Added interface FeatureSource, moved cpuid, rdt and pstate
  discovery logic into implementations.
- Updated logging output to make it more machine-readable
  (one feature, in label-format, per line).
- Normalized label names (derived from the underlying feature source).
- Added makefile.
- Added command-line argument parsing and proper CLI documentation.
- Added ability to filter the enabled feature sources: cpuid,rdt,pstate.
- Added ability to print the software version and exit.
- Added ability to print the CLI help.
- Updated README.
- Updated dep versions.
- Added -s -w to ldflags.
- Output version label along with discovered feature labels.
- Added sources section to README.
- Normalized README link for pstate
2016-08-30 14:41:59 -07:00
Connor Doyle
7788f2ebea Added vendor dir to .gitignore 2016-08-30 14:34:58 -07:00
Connor Doyle
308d999845 Nixed build instrs for rdt outside container. 2016-08-30 14:34:58 -07:00
Connor Doyle
4bd63cb7f3 Automatically determine git version for labels.
- Added git version to published labels.
- Minor formatting fix in job template.
- Added .travis.yml and added build status image link to README.
- Added .gitignore.
2016-08-30 14:34:58 -07:00
Connor Doyle
f9223bcb09 Fixed link to job template file in README. 2016-08-30 14:34:58 -07:00
Balaji Subramaniam
9c8b1bc8b3 Changed Dockerfile to use stable tag. Minor changes to readme. 2016-08-30 14:34:58 -07:00
Balaji Subramaniam
eaa116f565 Added more logging. Changed formatting. 2016-08-30 14:34:58 -07:00
Connor Doyle
873c3cf041 Rearranged README sections, formatting, wording.
- Normalized whitespace in rdt-discovery.
2016-08-30 14:34:40 -07:00
David Oppenheimer
86c20e6249 Added references section. 2016-07-31 21:35:52 -07:00
David Oppenheimer
d514d317c6 Added README 2016-07-25 22:44:45 -07:00
David Oppenheimer
017c343412 Template project files 2016-07-22 22:13:48 -07:00
Balaji Subramaniam
d96f50e7c6 1. Enabled RDT discovery.
2. Updated the ds to a job for node labelling.
3. Added script to run a job in each node.
4. Updated Readme.
2016-07-12 02:30:49 +02:00
Balaji Subramaniam
15a4d0ef2e Initial Commit. 2016-07-01 11:46:05 -07:00