File tree Expand file tree Collapse file tree 7 files changed +23
-13
lines changed Expand file tree Collapse file tree 7 files changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ source "$SCRIPT_DIR"/logging.sh
1111# Variables for deployment
1212CR_SCALE_OPERATOR_GIT_REPO=" https://github.com/test-network-function/cr-scale-operator.git"
1313TAG=" main"
14- IMG=" quay.io/testnetworkfunction/cr-scale-operator"
14+ IMG=" quay.io/testnetworkfunction/cr-scale-operator:latest "
1515CR_SCALE_OPERATOR_DIR=cr-scale-operator
1616
1717# Clone the repo.
Original file line number Diff line number Diff line change @@ -24,10 +24,16 @@ if $TNF_NON_OCP_CLUSTER; then
2424 # Install macvlan and other default plugins
2525 echo " ## install CNIs"
2626 pushd temp/multus-cni/e2e || exit
27- ./get_tools.sh
27+ if [ " $CPU_ARCH " != arm64 ]; then
28+ ./get_tools.sh
29+ fi
2830 ./generate_yamls.sh
2931 popd || exit
3032
33+ if [ " $CPU_ARCH " == arm64 ]; then
34+ sed -i ' s/amd64/arm64/g' temp/multus-cni/e2e/yamls/cni-install.yml
35+ fi
36+
3137 # Temporarily commenting this out as we are currently not running this in a non-allowlisted environment
3238 # sed 's/alpine/quay.io\/jitesoft\/alpine:latest/g' temp/multus-cni/e2e/yamls/cni-install.yml -i
3339 kubectl create -f temp/multus-cni/e2e/yamls/cni-install.yml
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ NUM_NODES="${NUM_NODES%"${NUM_NODES##*[![:space:]]}"}"
1515if [[ $NUM_NODES == 1 ]]; then
1616 REPLICAS=1
1717fi
18+
1819APP=" testss" RESOURCE_TYPE=" StatefulSet" MULTUS_ANNOTATION=$MULTUS_ANNOTATION REPLICAS=$REPLICAS " $SCRIPT_DIR " /mo ./test-target/local-pod-under-test.yaml > ./temp/rendered-local-statefulset-pod-under-test-template.yaml
1920oc apply --filename ./temp/rendered-local-statefulset-pod-under-test-template.yaml
2021rm ./temp/rendered-local-statefulset-pod-under-test-template.yaml
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ if [[ $NUM_NODES == 1 ]]; then
1616 REPLICAS=1
1717fi
1818" $SCRIPT_DIR " /mo ./test-target/test-service-account.yaml > ./temp/rendered-test-service-account-template.yaml
19+
1920APP=" testdp" RESOURCE_TYPE=" Deployment" MULTUS_ANNOTATION=$MULTUS_ANNOTATION REPLICAS=$REPLICAS " $SCRIPT_DIR " /mo ./test-target/local-pod-under-test.yaml > ./temp/rendered-local-pod-under-test-template.yaml
2021oc apply --filename ./temp/rendered-test-service-account-template.yaml
2122oc apply --filename ./temp/rendered-local-pod-under-test-template.yaml
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ oc version | grep Server >/dev/null || {
7373# create Multus annotations
7474create_multus_annotation () {
7575 for (( NUM = 0 ; NUM < MULTUS_IF_NUM; NUM++ )) ; do
76- MULTUS_ANNOTATION=" ${MULTUS_ANNOTATION} { \" name \" : \" ${NET_NAME} -$1 -${NUM} \" },"
76+ MULTUS_ANNOTATION=" ${MULTUS_ANNOTATION}${NET_NAME} -$1 -${NUM} ,"
7777 done
7878}
7979
@@ -86,9 +86,12 @@ if $TNF_NON_OCP_CLUSTER; then
8686
8787 # IPv6
8888 create_multus_annotation ipv6
89- if [ " $NUM " -ge 0 ]; then
90- # Remove last comma. Works on bash 3.2.4 on OS X:
91- # https://unix.stackexchange.com/questions/144298/delete-the-last-character-of-a-string-using-string-manipulation-in-shell-script
92- export MULTUS_ANNOTATION=" '[ ${MULTUS_ANNOTATION::- 1} ]'"
93- fi
89+
90+ # Remove the last character (comma)
91+ # https://unix.stackexchange.com/questions/144298/delete-the-last-character-of-a-string-using-string-manipulation-in-shell-script
92+ MULTUS_ANNOTATION=" ${MULTUS_ANNOTATION% ?} "
9493fi
94+
95+ CPU_ARCH=" $( uname -m) "
96+ export CPU_ARCH
97+ echo " CPU_ARCH=$CPU_ARCH "
Original file line number Diff line number Diff line change 1717
1818# Create array for images to preload
1919IMAGES_TO_PRELOAD=(
20- httpd:2.4.58
20+ docker.io/library/ httpd:2.4.58
2121 " $COMMUNITY_OPERATOR_IMAGEREPO " /" $COMMUNITY_OPERATOR_BASE " :" $COMMUNITY_OPERATOR_IMAGEVERSION "
2222 quay.io/testnetworkfunction/cnf-test-partner:latest
2323 quay.io/testnetworkfunction/debug-partner:latest
@@ -26,7 +26,6 @@ IMAGES_TO_PRELOAD=(
2626 quay.io/calico/node:v3.28.0
2727 quay.io/testnetworkfunction/nginx-operator-bundle:v0.0.1
2828 ghcr.io/k8snetworkplumbingwg/multus-cni:snapshot
29- ghcr.io/k8snetworkplumbingwg/multus-cni:snapshot-thick
3029 registry.access.redhat.com/ubi9/ubi:latest
3130 registry.access.redhat.com/ubi9/ubi-minimal:latest
3231 quay.io/operator-framework/configmap-operator-registry:latest
@@ -37,6 +36,6 @@ IMAGES_TO_PRELOAD=(
3736
3837# Preload images
3938for image in " ${IMAGES_TO_PRELOAD[@]} " ; do
40- docker pull " $image "
41- kind load docker- image " $ image"
39+ ${CONTAINER_CLIENT} pull " $image "
40+ ${CONTAINER_CLIENT} save " $image " -o image.tar && kind load image-archive image.tar && rm image.tar
4241done
Original file line number Diff line number Diff line change 2020 annotations :
2121 test-network-function.com/container_tests : ' ["PRIVILEGED_POD","PRIVILEGED_ROLE"]' # optional
2222 test-network-function.com/defaultnetworkinterface : ' "eth0"' # optional
23- k8s.v1.cni.cncf.io/networks : {{ MULTUS_ANNOTATION }}
23+ k8s.v1.cni.cncf.io/networks : ' {{ MULTUS_ANNOTATION }}'
2424 name : test
2525 spec :
2626 terminationGracePeriodSeconds : 30
You can’t perform that action at this time.
0 commit comments