From: Ciprian Barbu Date: Wed, 6 Mar 2019 14:12:01 +0000 (+0000) Subject: Merge "calico: Align IPv4 pool CIDR with k8s_master" X-Git-Tag: 1.0.0~41 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=213fe20e6996b570081a86926ceafe4240ca983f;hp=391562e14cef495d5b9f7d4dc854f890966e5f27;p=iec.git Merge "calico: Align IPv4 pool CIDR with k8s_master" --- diff --git a/scripts/setup-cni.sh b/scripts/setup-cni.sh index 8b9730c..643f157 100755 --- a/scripts/setup-cni.sh +++ b/scripts/setup-cni.sh @@ -3,6 +3,7 @@ set -o xtrace set -e CLUSTER_IP=${1:-172.16.1.136} # Align with the value in our K8s setup script +POD_NETWORK_CIDR=${2:-192.168.0.0/16} # Install the Etcd Database if [ "$(uname -m)" == 'aarch64' ]; then @@ -20,7 +21,8 @@ kubectl apply -f "${SCRIPTS_DIR}/cni/calico/${ETCD_YAML}" kubectl apply -f "${SCRIPTS_DIR}/cni/calico/rbac.yaml" # Install Calico to system -sed -i "s/10.96.232.136/${CLUSTER_IP}/" "${SCRIPTS_DIR}/cni/calico/calico.yaml" +sed -i "s@10.96.232.136@${CLUSTER_IP}@; s@192.168.0.0/16@${POD_NETWORK_CIDR}@" \ + "${SCRIPTS_DIR}/cni/calico/calico.yaml" kubectl apply -f "${SCRIPTS_DIR}/cni/calico/calico.yaml" # Remove the taints on master node