Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
k8s-device-plugin
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
RadeonOpenCompute
k8s-device-plugin
Commits
b02b0577
Commit
b02b0577
authored
Apr 30, 2020
by
Kenny Ho
Browse files
Options
Downloads
Patches
Plain Diff
Pass node name to labeller via env var
parent
2113ab20
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/k8s-node-labeller/main.go
+1
-5
1 addition, 5 deletions
cmd/k8s-node-labeller/main.go
k8s-ds-amdgpu-labeller.yaml
+6
-5
6 additions, 5 deletions
k8s-ds-amdgpu-labeller.yaml
with
7 additions
and
10 deletions
cmd/k8s-node-labeller/main.go
+
1
−
5
View file @
b02b0577
...
...
@@ -293,11 +293,7 @@ func main() {
}
// laballer only respond to event about the node it is on by matching hostname
b
,
err
:=
ioutil
.
ReadFile
(
"/labeller/hostname"
)
if
err
!=
nil
{
entryLog
.
Error
(
err
,
"Cannot read hostname"
)
}
hostname
:=
strings
.
TrimSpace
(
string
(
b
))
hostname
:=
os
.
Getenv
(
"DS_NODE_NAME"
)
pred
:=
predicate
.
Funcs
{
// Create returns true if the Create event should be processed
...
...
This diff is collapsed.
Click to expand it.
k8s-ds-amdgpu-labeller.yaml
+
6
−
5
View file @
b02b0577
...
...
@@ -49,9 +49,15 @@ spec:
containers
:
-
image
:
rocm/k8s-device-plugin:labeller-latest
name
:
amdgpu-lr-cntr
imagePullPolicy
:
Always
workingDir
:
/root
command
:
[
"
./k8s-node-labeller"
]
args
:
[
"
-vram"
,
"
-cu-count"
,
"
-simd-count"
,
"
-device-id"
,
"
-family"
]
env
:
-
name
:
DS_NODE_NAME
valueFrom
:
fieldRef
:
fieldPath
:
spec.nodeName
securityContext
:
privileged
:
true
#Needed for /dev
capabilities
:
...
...
@@ -61,8 +67,6 @@ spec:
mountPath
:
/sys
-
name
:
dev
mountPath
:
/dev
-
name
:
etc
mountPath
:
/labeller
volumes
:
-
name
:
sys
hostPath
:
...
...
@@ -70,6 +74,3 @@ spec:
-
name
:
dev
hostPath
:
path
:
/dev
-
name
:
etc
hostPath
:
path
:
/etc
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment