Optimize 2 points on the installation for CNI 35/2235/3
authorTrevor Tao <trevor.tao@arm.com>
Wed, 12 Feb 2020 13:57:55 +0000 (21:57 +0800)
committerTrevor Tao <trevor.tao@arm.com>
Wed, 12 Feb 2020 14:12:16 +0000 (22:12 +0800)
commit858c519703d05adbb39000ea3835f8e7c1058ab8
treee3d04c004a550e3a95a3ac3be39a884246f204c4
parentabc65c4c633ff0dae5ae8ba801f96ca80db903d7
Optimize 2 points on the installation for CNI

Optimize the installation of k8s CNI at 2 sides:

1. Change the parameter order for the most needed
parameters first as the following:
    CNI_TYPE
    POD_NETWORK_CIDR
    K8s_MASTER_IP
    SERVICE_CIDR
    CLUSTER_IP
    DEV_NAME

so that when installing manually, less parameters need to
be input because the default parameters are enough.

2. Taint the master node first for the case there is just
the master node to use. So the daemon pods of a CNI could
be scheduled on the master. If not, the installation for
the CNI may fail due to no node to schedule the pods.

The user could drain or set NoSchedule to close the master
for scheduling if needed:
kubectl drain <master node name>
or:
kubectl taint nodes <master node name> key=value:NoSchedule

Signed-off-by: Trevor Tao <trevor.tao@arm.com>
Change-Id: I8198814af22e687ccb223b9c2b767e64943588a7
Signed-off-by: Trevor Tao <trevor.tao@arm.com>
src/foundation/scripts/setup-cni.sh
src/foundation/scripts/startup.sh