summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
d02f271)
The `setup-cni.sh` script should be able to run with a different
current working directory, so use absolute paths where appropiate.
Change-Id: Ic19cbe0c8d1098f8c4a0f547ceeeed442182d28d
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ETCD_YAML=etcd-arm64.yaml
else
ETCD_YAML=etcd-amd64.yaml
ETCD_YAML=etcd-arm64.yaml
else
ETCD_YAML=etcd-amd64.yaml
-sed -i "s/10.96.232.136/${CLUSTER_IP}/" "cni/calico/${ETCD_YAML}"
-kubectl apply -f "cni/calico/${ETCD_YAML}"
+SCRIPTS_DIR=$(dirname "${BASH_SOURCE[0]}")
+
+sed -i "s/10.96.232.136/${CLUSTER_IP}/" "${SCRIPTS_DIR}/cni/calico/${ETCD_YAML}"
+kubectl apply -f "${SCRIPTS_DIR}/cni/calico/${ETCD_YAML}"
# Install the RBAC Roles required for Calico
# Install the RBAC Roles required for Calico
-kubectl apply -f "cni/calico/rbac.yaml"
+kubectl apply -f "${SCRIPTS_DIR}/cni/calico/rbac.yaml"
# Install Calico to system
# Install Calico to system
-sed -i "s/10.96.232.136/${CLUSTER_IP}/" cni/calico/calico.yaml
-kubectl apply -f cni/calico/calico.yaml
+sed -i "s/10.96.232.136/${CLUSTER_IP}/" "${SCRIPTS_DIR}/cni/calico/calico.yaml"
+kubectl apply -f "${SCRIPTS_DIR}/cni/calico/calico.yaml"
# Remove the taints on master node
kubectl taint nodes --all node-role.kubernetes.io/master- || true
# Remove the taints on master node
kubectl taint nodes --all node-role.kubernetes.io/master- || true