Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource Versioning #3067

Closed
lobkovilya opened this issue Nov 2, 2021 · 6 comments
Closed

Resource Versioning #3067

lobkovilya opened this issue Nov 2, 2021 · 6 comments
Assignees
Labels
area/api kind/improvement Improvement on an existing feature triage/accepted The issue was reviewed and is complete enough to start working on it triage/stale Inactive for some time. It will be triaged again

Comments

@lobkovilya
Copy link
Contributor

Context

Today Kuma resources don’t have versions. Even though on Kubernetes Kuma resources are presented as CRDs with GroupVersionKind, it’s not reflected in the internal Kuma model and that’s why it’s not propagated to Universal. Since we’re about to make some breaking changes related to policy matching, resource versioning is important to have backward compatibility support.

Implementation

Resource versioning could be added by introducing a new field to the Kuma core model. Today it consists of Mesh, Name, and Type. So on Universal when a user creates resource these fields have to be specified:

type: FaultInjection
mesh: default
name: fi1

A new field could be called apiVersion or something else but probably not just a version since it could be treated as object version, not API or type version.

On Kubernetes, the version will be converted to GroupVersionKind, so a new set of CRDs has to be created for every new version.

If a user didn’t specify the apiVersion, an old version called v1alpha1 will be used.

@austince
Copy link
Contributor

austince commented Nov 2, 2021

Not sure if you already have implementation plans, but I recently used the k8s.io/apimachinery lib's Scheme directly for this with a lot of success, though required some specific code generation that might not be compatible with the current protobuf-first approach. Are you planning on adding the apiVersion to the HTTP paths as well in this?

@lobkovilya
Copy link
Contributor Author

There are no concrete implementation plans so far :) cool, I'll take a look into k8s.io/apimachinery, do you know if it won't be a problem with Universal?

Are you planning on adding the apiVersion to the HTTP paths as well in this?

yeah, that's a good point, we definitely have to add /v1 prefix for our API

@austince
Copy link
Contributor

austince commented Nov 2, 2021

k8s.io/apimachinery, do you know if it won't be a problem with Universal?

It should be fine, doesn't use k8s cluster things, just defines ways to map between API versions of a given kind. But does involve a good bit of overhead.

@jpeach jpeach added the kuma-api label Nov 3, 2021
@jpeach
Copy link
Contributor

jpeach commented Nov 3, 2021

Since we’re about to make some breaking changes related to policy matching, resource versioning is important to have backward compatibility support.

Do you have an idea about how resource versioning helps the transition to the new policy matching world?

@lahabana lahabana added area/api kind/improvement Improvement on an existing feature and removed kuma-api labels Nov 22, 2021
@lahabana lahabana added the triage/accepted The issue was reviewed and is complete enough to start working on it label Nov 29, 2021
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Dec 30, 2021
@github-actions
Copy link
Contributor

This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.

@lahabana lahabana removed the triage/stale Inactive for some time. It will be triaged again label Feb 9, 2022
@lahabana lahabana added this to the resource versioning milestone Feb 14, 2022
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Mar 17, 2022
@github-actions
Copy link
Contributor

This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api kind/improvement Improvement on an existing feature triage/accepted The issue was reviewed and is complete enough to start working on it triage/stale Inactive for some time. It will be triaged again
Projects
None yet
Development

No branches or pull requests

4 participants