github.com/verrazzano/verrazzano@v1.7.1/ci/scripts/install_calico.sh (about)

     1  #!/bin/bash
     2  #
     3  # Copyright (c) 2021, 2023, Oracle and/or its affiliates.
     4  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     5  #
     6  
     7  SCRIPT_DIR=$(cd $(dirname "$0"); pwd -P)
     8  
     9  if [ -z $1 ]; then
    10      echo "Cluster name is required to be supplied"
    11      exit 1
    12  fi
    13  CLUSTER_NAME=$1
    14  
    15  CALICO_VERSION=$(grep 'calico-version=' ${SCRIPT_DIR}/../../.third-party-test-versions | sed 's/calico-version=//g')
    16  
    17  . $SCRIPT_DIR/download_calico.sh
    18  
    19  echo "Load the docker image from Calico archives at ${CALICO_HOME}/${CALICO_VERSION}/images."
    20  cd ${CALICO_HOME}/${CALICO_VERSION}/images
    21  for image_archive in *.tar; do
    22      echo "Loading image archive $image_archive ..."
    23      kind load image-archive "$image_archive" --name "${CLUSTER_NAME}"
    24  done
    25  
    26  echo "Apply ${CALICO_HOME}/${CALICO_VERSION}/manifests/calico.yaml."
    27  cd ${CALICO_HOME}/${CALICO_VERSION}/manifests
    28  kubectl apply -f calico.yaml