Code Review
/
iec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
calico: Align IPv4 pool CIDR with k8s_master
[iec.git]
/
scripts
/
setup-cni.sh
diff --git
a/scripts/setup-cni.sh
b/scripts/setup-cni.sh
index
8b9730c
..
643f157
100755
(executable)
--- 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
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
# 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
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
kubectl apply -f "${SCRIPTS_DIR}/cni/calico/calico.yaml"
# Remove the taints on master node