Skip to content

Commit

Permalink
add: labels for gpus
Browse files Browse the repository at this point in the history
  • Loading branch information
codekow committed Sep 16, 2023
1 parent 5d4be18 commit 402432b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}}}}}'
Expand Down Expand Up @@ -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}}')
Expand Down

0 comments on commit 402432b

Please sign in to comment.