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

Come up with globally valid API groups #1073

Closed
dlipovetsky opened this issue Jun 25, 2019 · 25 comments · Fixed by #1051 or #1182
Closed

Come up with globally valid API groups #1073

dlipovetsky opened this issue Jun 25, 2019 · 25 comments · Fixed by #1051 or #1182
Assignees
Labels
area/api Issues or PRs related to the APIs kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@dlipovetsky
Copy link
Contributor

dlipovetsky commented Jun 25, 2019

/kind bug

const ClusterFinalizer = "cluster.cluster.k8s.io"

The API group .k8s.io should not be used by anything other than core Kubernetes.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 25, 2019
@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

Do we want separate issues for the other places we'll need to change (all label keys, all finalizers, the API group itself)? Or lump them all here?

@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

/priority important-soon
/milestone v1alpha2
/area api

@k8s-ci-robot k8s-ci-robot added this to the v1alpha2 milestone Jun 25, 2019
@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. area/api Issues or PRs related to the APIs labels Jun 25, 2019
@dlipovetsky
Copy link
Contributor Author

@ncdc We can lump them all here. I'll update the issue. Can we enumerate the "bad" groups?

cluster.k8s.io
machines.k8s.io

@dlipovetsky dlipovetsky changed the title Decide which API group to use for Cluster Finalizer Decide which API group to use Jun 25, 2019
@dlipovetsky dlipovetsky changed the title Decide which API group to use Come up with globally valid API groups Jun 25, 2019
@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

Anything .k8s.io used as an API group name, label key, finalizer key. That's a good start. We can add more if we find them in the code.

@dlipovetsky
Copy link
Contributor Author

Got it.

Might providers be using these, too? I realize they'll define their own groups, but if they're using .k8s.io groups anywhere (like labels), we should let them know.

@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

It's certainly possible. We could check all the CAP* repos in kubernetes-sigs.

@detiber
Copy link
Member

detiber commented Jun 25, 2019

sigs.k8s.io is the official alias for kubernetes-sigs projects, so should likely use subdomains of that.
cluster.cluster-api.sigs.k8s.io for example.

Providers could use similar naming as well (assuming they are hosted under kubernetes-sigs):
<something>.cluster-api-provider-aws.sigs.k8s.io

@vincepri
Copy link
Member

/assign

Would this break v1alpha1 compatibility if we switch?

@vincepri
Copy link
Member

I can switch in #1035, if we find consensus

@detiber
Copy link
Member

detiber commented Jun 25, 2019

It will break v1alpha1 compatibility, we should only change for v1alpha2+

@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

The only way to preserve v1alpha1 compatibility is to not change it, which means keeping v1alpha1 at the old group name, and changing the name for v1alpha2. At that point, we wouldn't have CRD multi-versioning because it'd be 2 different API groups.

@vincepri
Copy link
Member

vincepri commented Jun 25, 2019

I don't think we can, given that multi-version support requires the same APIGroup 🤔

@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

We'd create 2 different API groups

@detiber
Copy link
Member

detiber commented Jun 25, 2019

We're going to need an external migration anyway since we are breaking out the embedded types and introducing the bootstrapping types.

@vincepri
Copy link
Member

Doesn't that mean no webhook conversion though?

@vincepri
Copy link
Member

In that case, I'd prefer to keep them under the new type and let the external migration tool handle the change, wdyt?

@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

I'm not sure conversion webhooks were really on the table given how much of a change this is, and the split from RawExtension to full CRDs will require custom logic per provider.

@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

keep them under the new type

What do you mean?

@vincepri
Copy link
Member

I mean just use the new APIGroup for v1alpha1 and v1alpha2 and let the external tool to change the APIGroup as well

@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2019

We have to keep v1alpha1 using the old api group

@detiber
Copy link
Member

detiber commented Jun 25, 2019

Yes, we can't change the api group otherwise we lose the connection to the underlying object storage in etcd

@vincepri vincepri mentioned this issue Jun 26, 2019
3 tasks
@vincepri
Copy link
Member

/lifecycle active

@k8s-ci-robot k8s-ci-robot added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Jun 26, 2019
@vincepri
Copy link
Member

/reopen

@k8s-ci-robot
Copy link
Contributor

@vincepri: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot reopened this Jul 23, 2019
@timothysc
Copy link
Member

the blessed namespace is x-k8s.io
Documentation has been updated and guidelines are also coming from sig-arch
https://github.com/kubernetes/community/blob/master/sig-architecture/api-review-process.md

@timothysc timothysc added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/bug Categorizes issue or PR as related to a bug. labels Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Issues or PRs related to the APIs kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants