Skip to content

Commit

Permalink
tuned profile for hypershift (#515)
Browse files Browse the repository at this point in the history
* tuned profile for hypershift

* cleanup tuning config

* removed quotes for json patch
  • Loading branch information
mukrishn authored Dec 8, 2022
1 parent 25b9a9a commit 72c6512
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion workloads/router-perf-v2/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,20 @@ reschedule_monitoring_stack(){
tune_workload_node(){
TUNED_NODE_SELECTOR=$(echo ${NODE_SELECTOR} | sed 's/^{\(.*\)\:.*$/\1/')
log "${1^} tuned pro***REMOVED***le for node labeled with ${TUNED_NODE_SELECTOR}"
sed "s#TUNED_NODE_SELECTOR#${TUNED_NODE_SELECTOR}#g" tuned-pro***REMOVED***le.yml | oc ${1} -f -
if "${HYPERSHIFT}"; then
export KUBECONFIG="${HYPERSHIFT_MANAGEMENT_KUBECONFIG}"
sed "s#TUNED_NODE_SELECTOR#${TUNED_NODE_SELECTOR}#g" tuned-pro***REMOVED***le.yml > /tmp/tuning
oc create con***REMOVED***gmap tuned-node --from-***REMOVED***le=/tmp/tuning -n clusters --dry-run=client -o yaml | oc ${1} -f -
TUNING_CONFIG='{"name":"tuned-node"}'
if [[ "${1}" == "delete" ]]; then TUNING_CONFIG=''; ***REMOVED***
for np in $(oc get nodepool -n clusters | grep ${CLUSTER_NAME} | awk '{print$1}');
do
oc patch -n clusters nodepool/$np --type=merge --patch='{"spec":{"tuningCon***REMOVED***g":['${TUNING_CONFIG}']}}'
done
export KUBECONFIG="${HYPERSHIFT_HOSTED_KUBECONFIG}"
***REMOVED***
sed "s#TUNED_NODE_SELECTOR#${TUNED_NODE_SELECTOR}#g" tuned-pro***REMOVED***le.yml | oc ${1} -f -
***REMOVED***
}

collect_metadata(){
Expand Down

0 comments on commit 72c6512

Please sign in to comment.