Add API Framework Revel Source Files
[iec.git] / src / foundation / scripts / setup-cni.sh
index fb02ff3..74b15e5 100755 (executable)
@@ -8,9 +8,9 @@ if [ -f "$HOME/.bashrc" ]; then
 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:-}
@@ -75,6 +75,18 @@ install_ovn_kubernetes(){
 
 }
 
+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
+}
 
 case ${CNI_TYPE} in
  'calico')
@@ -93,6 +105,10 @@ case ${CNI_TYPE} in
         echo "Install Ovn-Kubernetes ..."
         install_ovn_kubernetes
         ;;
+ 'danm')
+        echo "Install danm ..."
+        install_danm
+        ;;
  *)
         echo "${CNI_TYPE} is not supported"
         exit 1