#!/bin/bash
#
# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
# Licensed under the GNU General Public License Version 3 as shown at https://www.gnu.org/licenses/gpl-3.0.txt.

KUBECFG=$1
export KUBECONFIG=${KUBECFG}

# Is CNI installed and node is Ready
nodeReady=$(kubectl get nodes | grep "NotReady")
if [[ ! -z "${nodeReady}" ]]; then
	echo "Node(s) not ready, perhaps no CNI is installed, Multus needs a CNI to be installed first"
	exit 1
fi
