opencompose icon indicating copy to clipboard operation
opencompose copied to clipboard

Handle multiple API versions

Open pradeepto opened this issue 8 years ago • 2 comments

How do we handle different API versions for Kubernetes objects? OpenCompose spec needs a provision such that this information can be passed as metadata which can be translated whole converting to k8s artifacts/configs.

pradeepto avatar Mar 07 '17 12:03 pradeepto

we can have table which maintains what artifacts are supported in what version

like StatefulSet won't be in list for v1.3 but will be in v1.5

surajssd avatar Mar 08 '17 08:03 surajssd

We should not care about this much. This should be a task for k8s client-go. Something in terms of

versionedObject, err := scheme.ConvertToVersion(runtimeObject, api_v1.SchemeGroupVersion)

And just putting there svg of what we want to generate for. Last time I've checked there were a lot of object (we use) missing under unversioned. But AFAIK it is not finished yet in client-go. And some resources will be in unversioned after they leave beta. Frankly k8s don't really have any v2 resource so maybe they don't care about it that much yet. And client-go is pretty young. Let's cross that bridge when we come to it. We have more pressing issues at this time and it may get partially solved by just waiting.

tnozicka avatar Mar 08 '17 09:03 tnozicka