submariner-io / enhancements

Enhancement proposals for Submariner projects.
https://submariner.io/
Apache License 2.0
5 stars 24 forks source link

Add CI job for OVN IC #209

Open aswinsuryan opened 1 year ago

aswinsuryan commented 1 year ago

Add a CI job for OVN IC deployment

For OVN IC single node per zone deployments we need to change the command here to delete_cluster_on_fail ./ovn-kubernetes/contrib/kind.sh -ov "$OVN_IMAGE" -cn "${KIND_CLUSTER_NAME}" -ric -ic -npz 1 -wk 3 -lr -dd "${KIND_CLUSTER_NAME}.local"

we can maintain ovn-ic and non-ic deployment jobs for a while . So shipyard needs to be enhanced to add a new option like

make clusters using=ovn-ic

It is observed that OVN CI does not push latest images to quay so it would be more appropriate for Submariner to always build the image from the ovn kubernetes code we download

We can use the below steps to build the code and use it.

mkdir -p $HOME/work/src/github.com/ovn-org
cd $HOME/work/src/github.com/ovn-org
git clone https://github.com/ovn-org/ovn-kubernetes
cd $HOME/work/src/github.com/ovn-org/ovn-kubernetes/dist/images

# Build ovn docker image
pushd ../../go-controller
make
popd

# Build ovn kube image
# Find all built executables, but ignore the 'windows' directory if it exists
find ../../go-controller/_output/go/bin/ -maxdepth 1 -type f -exec cp -f {} . \;
echo "ref: $(git rev-parse  --symbolic-full-name HEAD)  commit: $(git rev-parse  HEAD)" > git_info

OVN_IMAGE=<registry>/ovn-daemonset-f:latest
docker build -t $OVN_IMAGE -f Dockerfile.fedora . 
docker push $OVN_IMAGE
dfarrell07 commented 1 year ago

@aswinsuryan Where do you want to run this CI? Shipyard we have already. Operator? Main repo? Lighthouse?

aswinsuryan commented 1 year ago

yes Operator, submariner and lighthouse.

dfarrell07 commented 1 year ago

yes Operator, submariner and lighthouse.

We don't currently test Lighthouse with OVN. I suspect we didn't think there would be unique interactions between Lighthouse and the CNI to test. If that's wrong, let me know and I'll add OVN coverage to Lighthouse.

There's some breakage in OVN CI (unrelated to this) that's being sorted out by a series of changes. Currently looking past those issues and verifying IC for operator and main repo here:

https://github.com/dfarrell07/submariner-operator/pull/225 https://github.com/dfarrell07/submariner/pull/57

aswinsuryan commented 1 year ago

yes Operator, submariner and lighthouse.

We don't currently test Lighthouse with OVN. I suspect we didn't think there would be unique interactions between Lighthouse and the CNI to test. If that's wrong, let me know and I'll add OVN coverage to Lighthouse.

There's some breakage in OVN CI (unrelated to this) that's being sorted out by a series of changes. Currently looking past those issues and verifying IC for operator and main repo here:

dfarrell07/submariner-operator#225 dfarrell07/submariner#57

ok , may be it is worth adding in subctl ? I see a recent PR missed an issue since OVN job was not run.

dfarrell07 commented 1 year ago

ok , may be it is worth adding in subctl ? I see a recent PR missed an issue since OVN job was not run.

Cool, good idea. Testing here: https://github.com/dfarrell07/subctl/pull/77

dfarrell07 commented 1 year ago

@aswinsuryan Is there a good way to check if IC mode is actually enabled/running?

aswinsuryan commented 1 year ago

@aswinsuryan Is there a good way to check if IC mode is actually enabled/running?

To check manually or on code ?

If we do kubectl get nodes -o yaml | grep zone we should be able to see zone configuration

dfarrell07 commented 1 year ago

Comparing the two deployments, I see OVN non-IC has k8s.ovn.org/zone-name: global whereas OVN IC has k8s.ovn.org/remote-zone-migrated: cluster1-worker2 and k8s.ovn.org/zone-name: cluster1-worker2. So I guess if the zone-name label exists and is not global we can assume it's OVN IC.