From 402432bba2b32e2c8b9883ce0bf0603d2414b6cb Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Sat, 16 Sep 2023 10:33:13 -0500 Subject: [PATCH] add: labels for gpus --- scripts/functions.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/functions.sh b/scripts/functions.sh index dbeb1dab..863ac891 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -288,6 +288,12 @@ aws_create_gpu_machineset(){ MACHINE_SET_GPU=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep gpu | head -n1) + # cosmetic + oc -n openshift-machine-api \ + patch "${MACHINE_SET_GPU}" \ + --type=merge --patch '{"spec":{"template":{"spec":{"metadata":{"labels":{"node-role.kubernetes.io/gpu":""}}}}}}' + + # should help auto provisioner oc -n openshift-machine-api \ patch "${MACHINE_SET_GPU}" \ --type=merge --patch '{"spec":{"template":{"spec":{"metadata":{"labels":{"cluster-api/accelerator":"nvidia-gpu"}}}}}}' @@ -388,6 +394,9 @@ rhdp_fix_api_certs(){ # user: ec2-user sudo su ec2-user /bin/bash -c 'id; sed -i.bak '/certificate-authority-data/d' ~/.kube/config' + + # user: root + sudo su root /bin/bash -c 'id; sed -i.bak '/certificate-authority-data/d' ~/.kube/config' " CERT_NAME=$(oc -n openshift-ingress-operator get ingresscontrollers default --template='{{.spec.defaultCertificate.name}}')