Skip to content

[Backport 1.32] Fixes kube-ovn addon - #343

Merged
claudiubelu merged 2 commits into
canonical:1.32from
claudiubelu:fix-kube-ovn-1.32
Apr 14, 2025
Merged

[Backport 1.32] Fixes kube-ovn addon#343
claudiubelu merged 2 commits into
canonical:1.32from
claudiubelu:fix-kube-ovn-1.32

Conversation

@claudiubelu

Copy link
Copy Markdown
Contributor

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.

Adds kube-ovn addon test. 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.

Fixes: canonical/microk8s#5012

Backported from: #337

Also verify you have:

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.
@claudiubelu

Copy link
Copy Markdown
Contributor Author

The kube-ovn test ran and passed.

@claudiubelu
claudiubelu merged commit 0795cb1 into canonical:1.32 Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants