File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -603,67 +603,36 @@ Sample Calico CNI configuration data used which is appended to the existing Kube
603603.. code-block :: bash
604604
605605 # cloud-config
606-
607606 - for i in {1..3}; do curl https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/calico.yaml -o /home/cloud/calico.yaml && break || sleep 5; done
608-
609607 - until [ -f /home/cloud/success ]; do sleep 5; done
610-
611608 - echo " Kubectl apply file"
612-
613609 - for i in {1..3}; do sudo /opt/bin/kubectl create -f /home/cloud/calico.yaml && break || sleep 5; done
614-
615610 - export PATH=$PATH :/home/cloud
616-
617611 - |
618-
619612 cat << 'EOF ' > /home/cloud/create-configs.sh
620-
621613 #!/bin/bash
622-
623614 cat << 'EOL' > /home/cloud/bgp-config.yaml
624-
625615 apiVersion: crd.projectcalico.org/v1
626-
627616 kind: BGPConfiguration
628-
629617 metadata:
630-
631618 name: default
632-
633619 spec:
634-
635620 logSeverityScreen: Debug
636-
637621 asNumber: {{ AS_NUMBER }}
638-
639622 EOL
640-
641623 cat << 'EOL' > /home/cloud/bgp-peer.yaml
642-
643624 apiVersion: crd.projectcalico.org/v1
644-
645625 kind: BGPPeer
646-
647626 metadata:
648-
649627 name: bgp-peer-example
650-
651628 spec:
652-
653629 peerIP: {{ ds.meta_data.peer_ip_address }}
654-
655630 asNumber: {{ ds.meta_data.peer_as_number }}
656-
657631 EOL
658-
659632 EOF
660-
661633 - chmod +x /home/cloud/create-configs.sh
662-
663634 - /home/cloud/create-configs.sh
664-
665635 - for i in {1..3}; do sudo /opt/bin/kubectl apply -f /home/cloud/bgp-config.yaml && break || sleep 5; done
666-
667636 - for i in {1..3}; do sudo /opt/bin/kubectl apply -f /home/cloud/bgp-peer.yaml && break || sleep 5; done
668637
669638
You can’t perform that action at this time.
0 commit comments