forked from rh-ecosystem-edge/ib-orchestrate-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vdu-profile.sh
executable file
·36 lines (30 loc) · 1.22 KB
/
vdu-profile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -e # Halt on error
KUBECONFIG=${KUBECONFIG:-./bootstrap-in-place-poc/sno-workdir/auth/kubeconfig}
export KUBECONFIG
machineconfigs="50-performance-openshift-node-performance-profile 99-master-generated-kubelet"
subscriptions="
openshift-local-storage/local-storage-operator
openshift-logging/cluster-logging
openshift-ptp/ptp-operator-subscription
openshift-sriov-network-operator/sriov-network-operator-subscription
"
oc apply -f ./vdu/01-namespaces.yaml
oc apply -f ./vdu/02-subscriptions.yaml
oc apply -f ./vdu/03-configurations.yaml
oc apply -f ./vdu/04-node-tuning.yaml
# Wait for generated machineconfig to have performanceprofile and tuned baked in
for mc in $machineconfigs; do
echo "Waiting for $mc to be present in running rendered-master MachineConfig"
until oc get mcp master -ojson | jq -r .status.configuration.source[].name | grep -xq $mc; do
echo -n .
sleep 30
done; echo
done
# Wait for generated machineconfig to be applied
oc wait --timeout=20m --for=condition=updated=true mcp master
for subscription in $subscriptions; do
namespace=${subscription%/*}
name=${subscription#*/}
oc wait subscription --timeout=20m --for=jsonpath='{.status.state}'=AtLatestKnown -n $namespace $name
done