How to test SDN OVN development on a Openshift cluster

Here you’ll find resources for creating a DEV version of any OVN image and subsequently using that with hack/ to deploy your DEV image on a running OCP cluster. This document details the procedure for OVN, but the changes needed to make this work with SDN should be quite small.

You will need the following script to build a custom DEV image with any on-going work in either openshift/ovn-kubernetes or ovn-org/ovn-kubernetes:


set -ex


cd go-controller
cd ../local
cp -r ../go-controller/_output/go/bin/* ./

buildah build-using-dockerfile -t "${QUAY_USER_NAME}/${QUAY_PUBLIC_PROJECT}:${serial}" -f Dockerfile.hack .
buildah push "${QUAY_USER_NAME}/${QUAY_PUBLIC_PROJECT}:${serial}"



COPY ovnkube /usr/bin/
COPY ovn-k8s-cni-overlay /usr/libexec/cni/ovn-k8s-cni-overlay

Remember to swap out the with the release version your DEV work corresponds to.

Once you’ve created a DEV version of your code and pushed that image to the image repository of your choosing, you can execute the following in the CNO to have them run on your OCP cluster:

./hack/ -e

That will write a file on your file system containing the environment variables the CNO uses to deploy the networking stack on the OCP cluster you’ve created.

Change the OVN_IMAGE or SDN_IMAGE to your DEV image name, then run:


The CNO should now be rolling out the DEV version on your cluster