canonical/microk8s-core-addons

[FR] Update Kube-OVN addon to the latest stable version of Kube-OVN (v1.12.x)

Opened this issue · 3 comments

Hello, thank you very much for maintaining this tool. It really simplifies Kubernetes.

Summary

Would it be possible to update the Kube-OVN addon to use the latest maintained stable version of Kube-OVN?

Why is this important?

According to /var/snap/microk8s/common/addons/core/addons.yaml the current version used in the addon is 1.10.0-alpha1 (the image configuration in the yaml files in this repository also seem to point out to version v1.10.0)1.

Between v1.10.0-alpha1 and v1.12.3 a series of bug fixes were implemented, and very important features were also added (e.g. natOutgoingPolicyRules). The complete list of changes can be seen in https://github.com/kubeovn/kube-ovn/blob/master/CHANGELOG.md.

Are you interested in contributing to this feature?

Yes we are interested in contributing to this update.

However we might need some pointers and tips on how to get started on that. (We have already been through the HACKING and CONTRIBUTING documents). For example it would be super helpful to understand the process that was initially employed to create the .yaml files in the addons/kube-ovn folder.

I can see that these files contain a comment on top in the form of Sourced from: https://..., however if I inspect the corresponding directory in GitHub for the latest release I can see that it contains many other .yaml files. Are all these new files necessary? How do I select which ones are relevant or not?

I can also see that some of the files have a Changelog comment that seems to indicate which changes were done to adapt the original source to microk8s. Is there any automation for that (e.g. patches that were applied to the original source)? Or any recommendation related to these patches?

Any other recommendation/advice/tips/hints would be greatly appreciated...

/cc @Chrisys93 @JuanMaParraU @AlexsJones

Footnotes

  1. If the current version installed by microk8s is really an alpha release, it would be very compelling to update to a non-alpha release.

Hi @abravalheri, thank you for opening the issue!

The list of changes to the YAML manifest is documented in

If you want to update to the latest version, you should be able to pull the latest manifests, and apply the same changes. Please make sure to keep these comments so that it's easier to maintain in the future.

Contributions are more than welcome, feel free to create a PR against this repo! Thanks!

Hi @neoaggelos, thank you very much for the response.

So considering your comment in the context of my questions, it is correct to assume the following:

I can see that these files contain a comment on top in the form of Sourced from: https://..., however if I inspect the corresponding directory in GitHub for the latest release I can see that it contains many other .yaml files. Are all these new files necessary? How do I select which ones are relevant or not?

Your comment seems to imply that no other file is necessary. Could you please confirm that?

I can also see that some of the files have a Changelog comment that seems to indicate which changes were done to adapt the original source to microk8s. Is there any automation for that (e.g. patches that were applied to the original source)? Or any recommendation related to these patches?

Could you please confirm that there are no patches? (Also by checking the git history of the files, it seems that the changes were not recorded as commits, but rather applied before being added to the repo). So I guess the best way of estimating how to implement the changes mentioned in the comment is to find KubeOVN tag v1.10.0-alpha1 and try to do a file diff...

Your comment seems to imply that no other file is necessary. Could you please confirm that?

Looking at the latest release files, I imagine that some things have been split into separate files. By glancing over the repo, I think you need the following sa.yaml, crd.yaml, ovn.yaml, kube-ovn.yaml. Only the last two should need to be patched (with the changes recorded on the existing comments. Please also preserve the "sourced from" comment for future reference.

Could you please confirm that there are no patches? (Also by checking the git history of the files, it seems that the changes were not recorded as commits, but rather applied before being added to the repo). So I guess the best way of estimating how to implement the changes mentioned in the comment is to find KubeOVN tag v1.10.0-alpha1 and try to do a file diff...

Indeed, no patches. Ideally, most of them should be simple search-replace, and the existing files can definitely help as a start. Happy to help here if something is not clear, or you can create a draft PR with a first version and we can work on it as well.

Thanks again!