Skip to content

Commit 1b5d18f

Browse files
Rui Gaohippogr
authored andcommitted
fix the redudant nodeselector for amd device plugin
1 parent 846e094 commit 1b5d18f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/device-plugin/deploy/start.sh.template

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ YAML
5252

5353
{ curl -s https://raw.githubusercontent.com/ROCm/k8s-device-plugin/master/k8s-ds-amdgpu-dp.yaml \
5454
| sed 's|rocm/k8s-device-plugin|{{ cluster_cfg['cluster']['docker-registry']['prefix'] }}k8s-rocm-device-plugin:{{ cluster_cfg['cluster']['docker-registry']['tag'] }}|' \
55-
| sed '/^[[:space:]]*tolerations:/i\ nodeSelector:\n vendor: amd';
55+
| sed -E '/^[[:space:]]*nodeSelector:[[:space:]]*$/{
56+
n
57+
s/^([[:space:]]*)(.*)$/\1vendor: amd\
58+
\1\2/
59+
}';
5660
cat <<'YAML'
5761
imagePullSecrets:
5862
- name: {{ cluster_cfg["cluster"]["docker-registry"]["secret-name"] }}

0 commit comments

Comments
 (0)