Skip to content

Instantly share code, notes, and snippets.

@peerapach
Created April 24, 2020 17:01
Show Gist options
  • Save peerapach/dc39954c1c5ee66e42284a2787837f15 to your computer and use it in GitHub Desktop.
Save peerapach/dc39954c1c5ee66e42284a2787837f15 to your computer and use it in GitHub Desktop.
oc get hpa -l 'app=activemq-health' --no-headers=true 2>&1 | awk -v q="'" '{ if($0 != "No resources found.") { print "oc patch hpa "$1 " --patch " q"{\"spec\":{\"minReplicas\":1}}"q } }' |xargs -0 bash -c -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment