Skip to content
Snippets Groups Projects
Commit b02b0577 authored by Kenny Ho's avatar Kenny Ho
Browse files

Pass node name to labeller via env var

parent 2113ab20
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment