INNER CODE UNIT · HCL

clean_node_active

oracle-terraform-modules/terraform-oci-oke · modules/utilities/resources/await_node_readiness.tpl.sh:7

function clean_node_active() {
  rm -f "$${ALL_FILE}" "$${ONE_FILE}"
}

function get_actual_node_count() (
  (kubectl get --no-headers nodes | grep -v NotReady | awk '{print $1}' | wc -l) 2>/dev/null || echo '0'
)

function wait_for_active() {
  clean_node_active

  while true; do
    local actual_node_count
    actual_node_count=$(get_actual_node_count)
    if [[ $${actual_node_count} -ge ${expected_node_count} ]]; then touch all_node.active; fi
    if [[ $${actual_node_count} -ge 1 ]]; then touch one_node.active; fi

    if [[ -f "$${ONE_FILE}" ]] && [[ "${await_node_readiness}" == 'one' ]]; then

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…