Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change daemonset images name to match the built one #108

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions sriov_antrea/sriov_antrea_ci_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ EOF
if [[ -z "${ANTREA_CNI_PR}${ANTREA_CNI_BRANCH}" ]];then
change_image_name $ANTREA_CNI_HARBOR_IMAGE antrea/antrea-ubuntu
fi


cp $WORKSPACE/antrea-cni/build/yamls/antrea.yml $ARTIFACTS

sed -i "s;\(^ *image\:\).*;\1 antrea/antrea-ubuntu;" $ARTIFACTS/antrea.yml

if [[ -z "$(grep hw-offload $WORKSPACE/antrea-cni/build/yamls/antrea.yml)" ]];then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think it is more clear to do grep in $ARTIFACTS folder.
Maybe it will be better to use --hw-offload as pattern for grep?
if condition can be simplified to remove subshell usage

if ! grep -q  --hw-offload $ARTIFACTS/antrea-cni/build/yamls/antrea.yml; then
...
fi

sed -i '/start_ovs/a\ - --hw-offload' $WORKSPACE/antrea-cni/build/yamls/antrea.yml
sed -i '/start_ovs/a\ - --hw-offload' $ARTIFACTS/antrea.yml
fi

cat > $ARTIFACTS/antrea-crd.yaml <<EOF
Expand Down Expand Up @@ -164,7 +168,7 @@ kubectl create -f $ARTIFACTS/configMap.yaml
kubectl create -f $(ls -l $WORKSPACE/sriov-network-device-plugin/deployments/*/sriovdp-daemonset.yaml|tail -n1|awk '{print $NF}')


kubectl create -f $WORKSPACE/antrea-cni/build/yamls/antrea.yml
kubectl create -f $ARTIFACTS/antrea.yml

cp $ARTIFACTS/antrea-crd.yaml $(ls -l $WORKSPACE/sriov-network-device-plugin/deployments/*/sriovdp-daemonset.yaml|tail -n1|awk '{print $NF}') $ARTIFACTS/
screen -S multus_sriovdp -d -m $WORKSPACE/sriov-network-device-plugin/build/sriovdp -logtostderr 10 2>&1|tee > $LOGDIR/sriovdp.log
Expand Down