fi
-CLUSTER_IP=${1:-172.16.1.136} # Align with the value in our K8s setup script
+CNI_TYPE=${1:-calico}
POD_NETWORK_CIDR=${2:-192.168.0.0/16}
-CNI_TYPE=${3:-calico}
+CLUSTER_IP=${3:-172.16.1.136} # Align with the value in our K8s setup script
K8S_MASTER_IP=${4:-10.169.41.173}
SERVICE_CIDR=${5:-172.16.1.0/24}
DEV_NAME=${6:-}
}
+install_multus_sriov_flannel(){
+ sed -i "s@10.244.0.0/16@${POD_NETWORK_CIDR}@" "${SCRIPTS_DIR}/cni/multus/multus-sriov-flannel/flannel-daemonset.yml"
+ # Install Multus Flannel+SRIOV by yaml files
+ # shellcheck source=/dev/null
+ source ${SCRIPTS_DIR}/cni/multus/multus-sriov-flannel/install.sh
+
+}
+
+install_danm(){
+ ${SCRIPTS_DIR}/cni/danm/danm_install.sh
+
+ # Deploying DANM suite into K8s cluster
+ kubectl create -f ${SCRIPTS_DIR}/cni/danm/integration/crds/lightweight/
+
+ # Create the netwatcher DaemonSet
+ kubectl create -f ${SCRIPTS_DIR}/cni/danm/integration/manifests/netwatcher/
+
+ #flannel as bootstrap networking solution
+ install_flannel
+}
+
+install_cilium(){
+ ${SCRIPTS_DIR}/cni/cilium/cilium_install.sh
+
+ # Deploying cilium CNI
+ kubectl create -f ${SCRIPTS_DIR}/cni/cilium/quick-install.yaml
+}
case ${CNI_TYPE} in
'calico')
echo "Install calico ..."
echo "Install Ovn-Kubernetes ..."
install_ovn_kubernetes
;;
+ 'multus-flannel-sriov')
+ echo "Install Flannel with SRIOV CNI by Multus-CNI ..."
+ install_multus_sriov_flannel
+ ;;
+ 'danm')
+ echo "Install danm ..."
+ install_danm
+ ;;
+ 'cilium')
+ echo "Install cilium ..."
+ install_cilium
+ ;;
*)
echo "${CNI_TYPE} is not supported"
exit 1