[Backport 1.32] Fixes kube-ovn addon - #343
Merged
Merged
Conversation
There are a few issues with the kube-ovn addon: - While enabling, it may timeout while waiting for the Calico pods to disappear. This may happen if its service account / cluster role / cluster role binding gets deleted, it can no longer fetch ClusterInformation. We're now removing them beforehand, and waiting for them to disappear. - The CNI_CONF_DIR should be /var/snap/microk8s/current/args/cni-network - When disabling, we should remove the 01-kube-ovn.conflist file from $CNI_CONF_DIR, otherwise kube-ovn may be used for future pods, even though the kube-ovn addon is not enabled. - When disabling, reenable the default CNI and rollout the CoreDNS deployment, so it can use the default CNI. - POD_CIDR, POD_GATEWAY, SVC_CIDR, JOIN_CIDR are not configurable, which may conflict with a node's CIDR, resulting in the kube-ovn not deploying properly.
The test will enable the kube-ovn addon and test the network connectivity by creating an nginx pod and service, and try to connect to that nginx through the cluster IP. Afterwards, the test will disable the addon, and test the network connectivity again.
bschimke95
approved these changes
Apr 11, 2025
Contributor
Author
|
The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are a few issues with the
kube-ovnaddon:ClusterInformation. We're now removing them beforehand, and waiting for them to disappear.CNI_CONF_DIRshould be/var/snap/microk8s/current/args/cni-network.01-kube-ovn.conflistfile from$CNI_CONF_DIR, otherwisekube-ovnmay be used for future pods, even though thekube-ovnaddon is not enabled.Adds kube-ovn addon test. The test will enable the
kube-ovnaddon and test the network connectivity by creating an nginx pod and service, and try to connect to that nginx through the cluster IP.Afterwards, the test will disable the addon, and test the network connectivity again.
Fixes: canonical/microk8s#5012
Backported from: #337
Also verify you have: