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

propose combining domain name & group, remove group from versions #14522

Merged
merged 1 commit into from
Oct 9, 2015

Conversation

lavalamp
Copy link
Member

I think it's too many levels to have separate domain names and groups. This will regularize URLs for accessing 3rd party objects and any other object in our system.

@k8s-bot
Copy link

k8s-bot commented Sep 24, 2015

GCE e2e build/test passed for commit 0a72b09c9a44597d00f58b54a29a632c15edc71b.

@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 24, 2015
@k8s-github-robot
Copy link

Labelling this PR as size/S

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 24, 2015
@smarterclayton
Copy link
Contributor

I agree - was just having this conversation with @deads2k this morning. OpenShift would be "openshift.io/v1" for our primary API and we would expose other experimental API versions.

@smarterclayton
Copy link
Contributor

Experimental should be experimental.k8s.io/v1 or similar

@lavalamp
Copy link
Member Author

Yeah, we can talk about renaming all API groups to this format-- I think it probably makes sense, if slightly verbose.

@lavalamp
Copy link
Member Author

Rebased.

@lavalamp lavalamp removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2015
@k8s-bot
Copy link

k8s-bot commented Sep 26, 2015

Unit, integration and GCE e2e test build/test passed for commit d6a72458a3ceb744272b655b377c9e078dfd6acf.

@k8s-bot
Copy link

k8s-bot commented Sep 28, 2015

Unit, integration and GCE e2e build/test failed for commit 91bad56e56dd2c1cebe06e1f0647f66bc7f27273.

@lavalamp
Copy link
Member Author

@k8s-bot test this

@k8s-bot
Copy link

k8s-bot commented Sep 29, 2015

Unit, integration and GCE e2e test build/test passed for commit 91bad56e56dd2c1cebe06e1f0647f66bc7f27273.

@lavalamp
Copy link
Member Author

@brendandburns ping?

@brendandburns
Copy link
Contributor

Yeah, I guess this LGTM. I'm a little uncomfortable with this change because I think that it's important to be able to tie related APIs (e.g. v1, v2) in different apigroups (e.g. 'stable', 'experimental') together in the same object for introspection.

@brendandburns brendandburns added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 1, 2015
@liggitt
Copy link
Member

liggitt commented Oct 1, 2015

this is no longer removing versions, right? can you update the PR title to reflect that?

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@lavalamp lavalamp removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 2, 2015
@lavalamp
Copy link
Member Author

lavalamp commented Oct 2, 2015

Removing LGTM to give @bgrant0607 a chance to review

versions:
- name: stable/v1
- name: experimental/v2
version: v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it impossible to create multiple versions in the same group.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lavalamp Was that intentional, since there is no conversion between versions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intended you to make another one of these entries for each version. I see I need to add the version to the name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I guess actually allowing multiple versions is easier. I will add that back. But not multiple groups.

@caesarxuchao
Copy link
Member

One nit, could you also fix the APIVersion here:

and get back:

{
   "apiVersion": "example.com/stable/v1",

@lavalamp lavalamp changed the title propose combining domain name & group, remove versions propose combining domain name & group, remove group from versions Oct 2, 2015
@lavalamp
Copy link
Member Author

lavalamp commented Oct 2, 2015

@caesarxuchao that's not an error, the group is "stable.example.com" and the version is "v1".

@lavalamp
Copy link
Member Author

lavalamp commented Oct 2, 2015

@caesarxuchao sorry! I saw the error. I thought you were asking for it to be changed to that. Will fix.

@lavalamp
Copy link
Member Author

lavalamp commented Oct 2, 2015

Comments addressed, thanks for catching things.

@lavalamp
Copy link
Member Author

lavalamp commented Oct 2, 2015

And in response to @brendandburns

I think that it's important to be able to tie related APIs (e.g. v1, v2) in different apigroups (e.g. 'stable', 'experimental') together in the same object for introspection.

I think this is currently a non-goal, even for regular api groups. We explicitly have an upgrade path for different versions of the same object in the same api group, but not between apigroups. We haven't even talked about inter-group resource migration scenarios yet. I think we can safely let future-us worry about this one for these objects after we've figured it out for first class objects.

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 2, 2015
@k8s-github-robot
Copy link

Labelling this PR as size/M

@k8s-bot
Copy link

k8s-bot commented Oct 2, 2015

Unit, integration and GCE e2e test build/test passed for commit e08fad9298c90de1b651fc446388863ccd3996a8.

@smarterclayton
Copy link
Contributor

Heh, that's something we have to go fix next week so we can ship
experimental APIs at a different rate than Kube :)

On Oct 2, 2015, at 3:44 PM, Daniel Smith notifications@github.com wrote:

And in response to @brendandburns https://github.com/brendandburns

I think that it's important to be able to tie related APIs (e.g. v1, v2) in
different apigroups (e.g. 'stable', 'experimental') together in the same
object for introspection.

I think this is currently a non-goal, even for regular api groups. We
explicitly have an upgrade path for different versions of the same object
in the same api group, but not between apigroups. We haven't even talked
about inter-group resource migration scenarios yet. I think we can safely
let future-us worry about this one for these objects after we've figured it
out for first class objects.


Reply to this email directly or view it on GitHub
#14522 (comment)
.

@liggitt
Copy link
Member

liggitt commented Oct 2, 2015

I hope future-us is smart

apiVersion: experimental/v1alpha1
kind: ThirdPartyResource
description: "A specification of a Pod to run on a cron style schedule"
versions:
- name: stable/v1
- name: experimental/v2
- v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the nested struct was used in order to permit additional info to be added for each version in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing I noticed: there is an APIGroup field in versions, https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/experimental/types.go#L177

The comment says it specifies "the API group to add this object into, default 'experimental'." Does that make sense? Isn't the group already specified in "name: cron-tab.stable.example.com"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caesarxuchao: my change is mostly about declaring having a group there wrong :)

@bgrant0607 OK, I'll add it back.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then could you search and remove the reference to this field in the doc? Thank you.

The APIGroup this version should belong to.

We also need to delete that field from types.go, but that can be done after 1.1.

@smarterclayton
Copy link
Contributor

Judging by past-us records....

On Oct 2, 2015, at 4:47 PM, Jordan Liggitt notifications@github.com wrote:

I hope future-us is smart


Reply to this email directly or view it on GitHub
#14522 (comment)
.

@lavalamp
Copy link
Member Author

lavalamp commented Oct 2, 2015

@smarterclayton

Heh, that's something we have to go fix next week so we can ship experimental APIs at a different rate than Kube :)

For now, I recommend just making an additional os-experimental group with the same SLO re: unexpected deprecations & deletions. :/

In the future we may want to start each group with an experimental version... but we still have some work to get there.

@k8s-bot
Copy link

k8s-bot commented Oct 2, 2015

Unit, integration and GCE e2e test build/test passed for commit 7d0989e7716a0e68a8b3d71b8e616adc050192e6.

- name: stable/v1
- name: experimental/v2
- Name: v1
- Name: v2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lowercase

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh!

@bgrant0607
Copy link
Member

@brendandburns What is the current status of the ThirdPartyResource implementation? What works, what doesn't?

Also remove group from versions.
@k8s-bot
Copy link

k8s-bot commented Oct 7, 2015

GCE e2e test build/test passed for commit 72c1340.

@bgrant0607
Copy link
Member

Thanks. LGTM.

If ThirdPartyResource is a registered API, it more or less works according to the previous spec, and we don't make it conform to this spec, then we shouldn't cherrypick this.

If ThirdPartyResource doesn't really work, even according to the previous spec, then we should unregister it from the API.

If ThirdPartyResource isn't registered, then we should cherrypick this to let people know what our current thinking is.

@bgrant0607 bgrant0607 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 8, 2015
@bgrant0607
Copy link
Member

Rerunning Shippable. It was an integration test flake.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Oct 9, 2015
@k8s-github-robot k8s-github-robot merged commit 2192946 into kubernetes:master Oct 9, 2015
xingzhou pushed a commit to xingzhou/kubernetes that referenced this pull request Dec 15, 2016
@lavalamp lavalamp deleted the 3p-api-group branch September 1, 2020 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants