This repository was archived by the owner on Apr 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +28
-32
lines changed
Expand file tree Collapse file tree 5 files changed +28
-32
lines changed Original file line number Diff line number Diff line change 3030 run : source ./ci/ci.sh && create_kind_cluster
3131 - name : deploy_multus
3232 run : source ./ci/ci.sh && deploy_multus
33+ - name : deploy_userspacecni
34+ run : source ./ci/ci.sh && deploy_userspace
3335 - name : vpp_e2e_test
3436 run : source ./ci/ci.sh && vpp_e2e_test
3537 - name : build_ovs_container
Original file line number Diff line number Diff line change 3737 run : source ./ci/ci.sh && create_kind_cluster
3838 - name : deploy_multus
3939 run : source ./ci/ci.sh && deploy_multus
40+ - name : deploy_userspacecni
41+ run : source ./ci/ci.sh && deploy_userspace
4042 - name : vpp_e2e_test
4143 run : source ./ci/ci.sh && vpp_e2e_test
4244
6365 run : source ./ci/ci.sh && create_kind_cluster -v ${{ matrix.kubernetes_version }}
6466 - name : deploy_multus
6567 run : source ./ci/ci.sh && deploy_multus
68+ - name : deploy_userspacecni
69+ run : source ./ci/ci.sh && deploy_userspace
6670 - name : vpp_e2e_test
6771 run : source ./ci/ci.sh && vpp_e2e_test
6872 - name : build_ovs_container
Original file line number Diff line number Diff line change @@ -45,10 +45,10 @@ kubectl get all --all-namespaces
4545sleep 10
4646cd $USERSPACEDIR
4747
48- docker build . -f ./docker/userspacecni/Dockerfile -t userspacecni:latest
48+ make build
4949# gets path for one directopry above, needed for mkdir with docker cp below
5050mkdir_var=$( dirname ${USERSPACEDIR} )
51- kind load docker-image userspacecni
51+ kind load docker-image localhost:5000/ userspacecni
5252docker exec -i kind-control-plane bash -c " mkdir -p $mkdir_var "
5353docker cp " ${USERSPACEDIR} " " kind-control-plane:${USERSPACEDIR} "
5454}
@@ -62,6 +62,15 @@ sed -i "s/snapshot-thick/v4.0.2/g" multus-daemonset.yml
6262kubectl apply -f ./multus-daemonset.yml
6363}
6464
65+ deploy_userspace (){
66+ cd $USERSPACEDIR
67+ # kubectl label nodes kind-control-plane app=userspace-cni
68+ kubectl label nodes --all app=userspace-cni
69+ make deploy
70+ echo " sleeping for 20 to allow userspace to deploy first"
71+ sleep 20
72+ }
73+
6574vpp_e2e_test (){
6675cd $CI_DIR /vpp_test_setup/
6776echo " Setting up vpp host"
@@ -161,6 +170,7 @@ run_all(){
161170install_go_kubectl_kind
162171create_kind_cluster -v v1.27.3
163172deploy_multus
173+ deploy_userspace
164174vpp_e2e_test
165175build_ovs_container
166176build_testpmd_container
Original file line number Diff line number Diff line change @@ -9,38 +9,8 @@ kubectl create -n vpp configmap vpp-startup-config --from-file="${USERSPACEDIR}/
99
1010worker=" kind-control-plane"
1111
12-
13- rm /opt/cni/bin/userspace
1412docker exec -i kind-control-plane bash -c " mkdir -p /var/run/vpp/app"
1513
16- cat << EOF | kubectl apply -f -
17- ---
18- apiVersion: v1
19- kind: Pod
20- metadata:
21- name: userspacecni-$worker
22- namespace: vpp
23- spec:
24- nodeSelector:
25- kubernetes.io/hostname: $worker
26- containers:
27- - name: userspacecni-$worker
28- image: userspacecni:latest
29- imagePullPolicy: IfNotPresent
30- volumeMounts:
31- - name: cni
32- mountPath: /opt/cni/bin
33- volumes:
34- - name: cni
35- hostPath:
36- path: /opt/cni/bin
37- restartPolicy: Never
38- EOF
39-
40-
41- echo " sleeping for 20 to allow userspace to deploy first"
42- sleep 20
43-
4414cat << EOF | kubectl apply -f -
4515---
4616apiVersion: v1
Original file line number Diff line number Diff line change 1717 - name : userspace-cni-plugin
1818 image : localhost:5000/userspacecni # registory:imagename
1919 imagePullPolicy : IfNotPresent
20+ securityContext :
21+ allowPrivilegeEscalation : false
22+ privileged : false
23+ resources :
24+ requests :
25+ cpu : 1m
26+ memory : 1Mi
27+ limits :
28+ cpu : 100m
29+ memory : 30Mi
2030 volumeMounts :
2131 - name : cnibin
2232 mountPath : /opt/cni/bin
You can’t perform that action at this time.
0 commit comments