-
Notifications
You must be signed in to change notification settings - Fork 41
Strategy to support various Kubernetes versions #141
Comments
@surajssd I think introducing a flag and supporting multiple releases at the same time will be a maintenance hell, especially because kedge is super new right now. For now (and only for now), we can stick with supporting either the latest Kubernetes release, or the Kubernetes being used in the latest OpenShift release. And when we have requests to support multiple branches, we can have different branches for different Kubernetes versions that we support, instead of putting all in the master. Thoughts? |
@containscafeine our potential users are not on latest of either |
@surajssd are we not expecting at least OpenShift v1.5.1, which is the latest tag? |
Multiple branches will be maintenance hell :-D and usability hell for users. I don't think that there is other way than flags. |
@kadel if we do everything in master, we will encounter problems like different versions of vendored packages. The first one that comes to my mind is client-go. Different Kubernetes versions will require different versions of client-go, how do we vendor them? Another problem would be the ever growing size of the binary because of multiple versions being supported. In case of multiple branches, we will need to tag the branches, update the docs (add a table for downloading binaries for different versions) and build RPMs in such a way that the user gets the binary that he/she requires. The multiple branches approach is followed by Kubernetes, OpenShift, etc, so I think it should be fine. WDYT? |
So If I want to convert for multiple for Kuberntes version I'll have to download multiple different binaries?
This is something else, they don't add new features to the old versions, so it's easier to maintain. |
@containscafeine client-go supports all older version from which it is being used, that is what README of client go says. See https://github.com/kubernetes/client-go#compatibility-matrix We will have to see how do we output k8s version specific thing. |
Yep, as @surajssd there shouldn't be any vending issues, we just have to take care of outputting right stuff |
I think we should increase the priority of this. We can start working on this as soon as #181 is merged. |
I think that adding |
@kadel minikube has a |
yes, it can be |
I'm bumping priority on this, as I think we should solve this soon. |
We could also leverage Kubernetes plugins for this. |
Okay, so we need to figure out multiple things. Here is my brain dump. So, like @surajssd pointed out earlier, client-go has a compatibility matrix - https://github.com/kubernetes/client-go#compatibility-matrix, so
|
We can derive information about the API objects in a given release from https://kubernetes.io/docs/reference/#api-reference and https://kubernetes.io/docs/reference/api-overview/ |
because we are also doing #210 we need also think about supporting multiple OpenShift versions, so this issue should also take into account that. |
This commit updates client-go to v4.0.0 from v3.0.0. This is being done as part of kedgeproject#141 since v4.0.0 has a much broader coverage of Kubernetes versions than v3.0.0, which is what our target is. There have been other slight modifications in glide.yaml to make this client-go version bump work like k8s.io/apimachinery is no longer being tied to a particular version, since it was throwing some errors and was not required anymore. Also, pflag has been tied to version v1.0.0 since cobra was complaining and refusing to compile to some issues. No change has been made in code. To update the vendor directory, the following 2 commands were run - glide update --strip-vendor glide-vc --only-code --no-tests --use-lock-file
Cabal log -
|
And had the following conversation with @kadel on our slack -
|
|
Okay, so as per the current resources that we support in spec.go, there are only 2 beta v1 resources, which are Deployment and Ingress, except those all are v1 resources. None of these resources have changed between the versions 1.6 and 1.7. Talking to @surajssd, we were thinking if we actually have this problem right now. If we are going to support 1.6+, there are no breaking changes. Is this a feature for the future, or ... ? ping @kedgeproject/maintainers, do we need to rescope or reprioritize this one? |
Can we please finalize the priority of this issue? If it is |
ping @kadel @pradeepto |
So we talked, and we will put in maybe a maximum of 2 days into this and see if we can come up with a non-convoluted solution to this since we've already investigated a bit into this. If we cannot, we put it on the backburner since this is not a problem we're facing right now. |
It might be time to reopen discussion on this. Here are some information changes in Workloads API in versions 1.8 and 1.9 https://kubernetes.io/docs/reference/workloads-18-19/ With default selector changes and introducing apps/v1 in 1.9 we should start thinking how we are going to handle all this. The first question that we should answer is how many versions of Kubernetes are going to support. |
Problem:
Right now we support k8s 1.5 (if I am not mistaken). Which means the artifacts generated will work on Kubernetes 1.5 and if we don't use any new feature we in effect also support older version of Kubernetes.
But this could be a problem if we generate something that is not supported on old version then the generation is of no use.
For e.g. (assume we have already added support for
StatfulSets
) If we generate the artifacts calling themStatefulSets
then this will not work on Kubernetes older versions since it was called asPetSets
back then.Another e.g.
envFrom
is a really cool feature and will ease our life in many ways, but it is only in Kubernetes 1.6 so anyone using older versions won't have it. But we have added it with some back ports but it is also limited.My question here being how do we support multiple versions of Kubernetes? If someone has the latest Kubernetes we should not stop them from having all the latest features just because we don't support some of them.
How do we solve it?
User: I think we can have a flag where you can mention what version of Kubernetes you want output for and then we generate the artifacts for that.
Development approach: From the code perspective we can use the approach of what we did in kompose. Define the conversion in various K8S versioned generator and depending on what version we are generating for we use that particular version of genertor.
The text was updated successfully, but these errors were encountered: