Skip to content

Commit

Permalink
update install calico
Browse files Browse the repository at this point in the history
Signed-off-by: bzsuni <[email protected]>
  • Loading branch information
bzsuni committed Dec 6, 2023
1 parent 6d3657a commit 6f6eb56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ E2E_KIND_IPV6_POD_CIDR = fd40::/48

#====== calico
CALICO_VERSION ?=
MAMUAL_CALICO_VERSION ?= v3.26.4
INSTALL_TIME_OUT = 300s
ifeq ($(E2E_CHINA_IMAGE_REGISTRY),true)
CALICO_REGISTRY ?= docker.m.daocloud.io
Expand Down
7 changes: 4 additions & 3 deletions test/scripts/installCalico.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ CALICO_YAML=${DEST_CALICO_YAML_DIR}/calico.yaml
CALICO_CONFIG=${DEST_CALICO_YAML_DIR}/calico_config.yaml
CALICO_NODE=${DEST_CALICO_YAML_DIR}/calico_node.yaml

# CALICO_VERSION
# CALICO_VERSION
if [ -z "${CALICO_VERSION}" ]; then
[ -n "${HTTP_PROXY}" ] && calico_tag=$(curl --retry 3 --retry-delay 5 -x "${HTTP_PROXY}" -s https://api.github.com/repos/projectcalico/calico/releases/latest | jq -r '.tag_name')
[ -z "${HTTP_PROXY}" ] && calico_tag=$(curl --retry 3 --retry-delay 5 -s https://api.github.com/repos/projectcalico/calico/releases/latest | jq -r '.tag_name')
[ "${calico_tag}" == "null" ] && { echo "failed get calico version"; exit 1; }
[ -n "${HTTP_PROXY}" ] && { calico_info_json=$(curl --retry 3 --retry-delay 5 -x "${HTTP_PROXY}" -s https://api.github.com/repos/projectcalico/calico/releases/latest); echo ${calico_info_json}; calico_tag=$(echo ${calico_info_json} | jq -r '.tag_name'); }
[ -z "${HTTP_PROXY}" ] && { calico_info_json=$(curl --retry 3 --retry-delay 5 -s https://api.github.com/repos/projectcalico/calico/releases/latest); echo ${calico_info_json}; calico_tag=$(echo ${calico_info_json} | jq -r '.tag_name'); }
[ "${calico_tag}" == "null" ] && { echo "failed to get the calico version, specify the version manually"; calico_tag=${MANUAL_CALICO_VERSION}; }
else
calico_tag=${CALICO_VERSION}
fi
Expand Down

0 comments on commit 6f6eb56

Please sign in to comment.