From ad6a3e076cbe812e610ce89420b027d36b4080d3 Mon Sep 17 00:00:00 2001 From: Adrien Date: Mon, 18 May 2020 22:37:02 +0200 Subject: [PATCH] Update script --- bin/gen_list.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/gen_list.sh b/bin/gen_list.sh index 05fabf1..84c5192 100755 --- a/bin/gen_list.sh +++ b/bin/gen_list.sh @@ -1,16 +1,16 @@ #!/bin/bash curl https://docs.projectcalico.org/manifests/calico.yaml -O kubernetes-split-yaml calico.yaml > generated.log -mv generated/*.yaml ./ +mv generated/*.yaml files/ rmdir generated -echo -e '---\ncalico_files:' > ../vars/calico-files.yaml -cat generated.log | while read LIGNE; do if [ $(echo "${LIGNE}" | grep -c ^File) -eq 1 ]; then echo -n "${LIGNE} "; else echo "${LIGNE}"; fi; done | grep ^File | sort -V | sed 's|.*\(generated/\)\(.*\.yaml\)| - "version/\2"|' >> ../vars/calico-files.yaml +echo -e '---\ncalico_files:' > vars/calico-files.yaml +cat generated.log | while read LIGNE; do if [ $(echo "${LIGNE}" | grep -c ^File) -eq 1 ]; then echo -n "${LIGNE} "; else echo "${LIGNE}"; fi; done | grep ^File | sort -V | sed 's|.*\(generated/\)\(.*\.yaml\)| - "version/\2"|' >> vars/calico-files.yaml rm -f generated.log calico.yaml # Configure the pod IP range -line_nb=$(grep -n CALICO_IPV4POOL_CIDR calico-node-DaemonSet.yaml | cut -d: -f1) -sed "$line_nb,$[$line_nb+1] s/# //" -i calico-node-DaemonSet.yaml +line_nb=$(grep -n CALICO_IPV4POOL_CIDR files/calico-node-DaemonSet.yaml | cut -d: -f1) +sed "$line_nb,$[$line_nb+1] s/# //" -i files/calico-node-DaemonSet.yaml # Switch to VxLan -sed "/calico_backend:/ s/bird/vxlan/" -i calico-config-ConfigMap.yaml -sed -e "s/IPIP$/VXLAN/" -e "/-bird-/ s/\(- -bird-.*\)/# \1/" -i calico-node-DaemonSet.yaml +sed "/calico_backend:/ s/bird/vxlan/" -i files/calico-config-ConfigMap.yaml +sed -e "s/IPIP$/VXLAN/" -e "/-bird-/ s/\(- -bird-.*\)/# \1/" -i files/calico-node-DaemonSet.yaml