mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-28 10:47:23 +00:00
Changed Dockerfile to use stable tag. Minor changes to readme.
This commit is contained in:
parent
eaa116f565
commit
9c8b1bc8b3
3 changed files with 20 additions and 7 deletions
|
@ -10,7 +10,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#========================================================================
|
||||
FROM golang
|
||||
FROM golang:1.6
|
||||
|
||||
ADD ./main.go /go/src/github.com/intelsdi-x/dbi-iafeature-discovery/
|
||||
ADD ./glide.yaml /go/src/github.com/intelsdi-x/dbi-iafeature-discovery/
|
||||
|
|
|
@ -53,7 +53,7 @@ will not add a label with the value `"false"` for features that are not
|
|||
present._
|
||||
|
||||
```
|
||||
"node.alpha.intel.com/v0.1.0/cpu/<feature-name>": "true"
|
||||
"node.alpha.intel.com/v0.1.0-cpu-<feature-name>": "true"
|
||||
```
|
||||
|
||||
### System Requirements
|
||||
|
@ -142,7 +142,7 @@ how to target the Intel RDT L3 cache allocation (RDTL3CA) feature.
|
|||
}
|
||||
],
|
||||
"nodeSelector": {
|
||||
""node.alpha.intel.com/v0.1.0-cpu-RDTL3CA": "true"
|
||||
"node.alpha.intel.com/v0.1.0-cpu-RDTL3CA": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
21
main.go
21
main.go
|
@ -77,8 +77,8 @@ func main() {
|
|||
outString := string(out[:])
|
||||
if outString == "DETECTED" {
|
||||
node.Labels["node.alpha.intel.com/v"+version+"-cpu-RDTMON"] = "true"
|
||||
log.Printf("RDT Monitoring Detected\n")
|
||||
}
|
||||
log.Printf("RDT Monitoring Detected\n")
|
||||
|
||||
cmd = "/go/src/github.com/intelsdi-x/dbi-iafeature-discovery/rdt-discovery/l3-alloc-discovery"
|
||||
out, err = exec.Command("bash", "-c", cmd).Output()
|
||||
|
@ -89,9 +89,9 @@ func main() {
|
|||
outString = string(out[:])
|
||||
if outString == "DETECTED" {
|
||||
node.Labels["node.alpha.intel.com/v"+version+"-cpu-RDTL3CA"] = "true"
|
||||
log.Printf("RDT L3 Cache Allocation Detected\n")
|
||||
}
|
||||
log.Printf("RDT L3 Cache Allocation Detected\n")
|
||||
|
||||
|
||||
cmd = "/go/src/github.com/intelsdi-x/dbi-iafeature-discovery/rdt-discovery/l2-alloc-discovery"
|
||||
out, err = exec.Command("bash", "-c", cmd).Output()
|
||||
if err != nil {
|
||||
|
@ -101,8 +101,21 @@ func main() {
|
|||
outString = string(out[:])
|
||||
if outString == "DETECTED" {
|
||||
node.Labels["node.alpha.intel.com/v"+version+"-cpu-RDTL2CA"] = "true"
|
||||
log.Printf("RDT L2 Cache Allocation Detected\n")
|
||||
}
|
||||
|
||||
// If turbo boost is enabled, add it as a node label
|
||||
cmd = "cat /sys/devices/system/cpu/intel_pstate/no_turbo"
|
||||
out, err = exec.Command("bash", "-c", cmd).Output()
|
||||
if err != nil {
|
||||
log.Fatalf("Can't Dectect if Turbo Boost is Enabled: %v", err)
|
||||
}
|
||||
|
||||
outString = string(out[:])
|
||||
if outString == "0\n" {
|
||||
node.Labels["node.alpha.intel.com/v"+version+"-cpu-turbo"] = "true"
|
||||
log.Printf("Turbo Boost is Enabled\n")
|
||||
}
|
||||
log.Printf("RDT L2 Cache Allocation Detected\n")
|
||||
|
||||
// Update the node with the node labels
|
||||
_, err = cli.Nodes().Update(node)
|
||||
|
|
Loading…
Add table
Reference in a new issue