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
StorageClass should not be in the extensions group #31521
Comments
Introduced in #29694, types here: https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/extensions/types.go#L924 |
|
I think that makes a lot of sense. That group would be the final resting place of PV and PVC for their next rev to help us retire the legacy API group. |
a) StorageClass is beta, not alpha I will paste my messages from the other thread: In this particular case, we could make a new group, but in general we We need an answer to this whole problem in general. I am not happy |
API groups is required in order to have extension API resources (unless we I don't think we necessarily have to treat groups as "all kinds must be in On Fri, Aug 26, 2016 at 1:00 PM, Tim Hockin notifications@github.com
|
So in this case, if I were adding something to Are we really in uncharted space here? Is there no established best practice for this in REST-ville? |
My objection isn't to adding a type to an existing version of an API group. I'm concerned about using this particular group as a catchall for "I'm going to want a new API group, but this is a convenient place at the moment for a type that doesn't belong in this group in the end".
Marginally. I still think that if you know you have a kind that belongs in a new API group, you should create that API group. In this case, |
I think we need a systemic decision about this INCLUDING the "I want to add I am not in charge of UX, I'm just a jerk with opinions. I will adhere to @bgrant0607 @smarterclayton @lavalamp - UX/API decision needed. On Fri, Aug 26, 2016 at 10:29 AM, David Eads notifications@github.com
|
I don't see |
Thinking about it, I'm not so sure that it has to be that way. There
are certainly arguments that you can retcon an object into all prior
versions, but objects themselves are fairly independent. If we had v2
PVC - they'd probably still bind to v1 PV. If they didn't, they're
not really PVC anymore.
Versions are for schema versioning. They don't map to fundamental
behavior. Any change dramatic enough that you can't forward convert
means it's not the same object anymore (RS VS RC).
|
Clayton: I don't know which item you are responding to
David: I don't want to make a different decision because of
instance-specific circumstances. The same decision was made for
NetworkPolicy in v1.3 because it was being considered for the 'policy'
apigroup but wasn't compatible with that groups version standing.
|
Been trying since before 1.3... |
On Fri, Aug 26, 2016 at 2:09 PM, Daniel Smith notifications@github.com wrote:
Do not interpret as a slight, please. I know we're working on it. I |
I think we need to reassess how we are putting objects into groups and
how we version them. I don't think putting an alpha resource into a
new group is wrong. Groups represent areas of function, not client
contracts. Versions don't have to be atomic to the kinds within them.
Groups can have permanent alpha versions for new resources. We don't
have to add new resources to all old versions.
The decisions about these need to be a bit broader than just a couple
of folks talking, and we need to get a lot better at formalizing the
process and applying it. I don't think we've succeeded at that yet.
|
That sounds reasonable. When combined with discovery and preferred version, it ought to be unambiguous when used. |
I assume, and I think others do, that an apigroup with a given version Now that we have some miles on apigroups, I agree it is time to revisit. On Fri, Aug 26, 2016 at 3:23 PM, Clayton Coleman notifications@github.com
|
It might be surprising at first, but I'm not sure it's surprising enough to You'd have a client like (import "k8s.io/client-go/storage/v1alpha1") and I agree occasionally you'll be irritated to have to use "v2pods" and On Fri, Aug 26, 2016 at 7:40 PM, Tim Hockin notifications@github.com
|
I apologize that I don't have a lot of time for this discussion right now. However, Yes, we could independently version every single resource, but that greatly complicates user experience, cross references between resources, defaulting of preferred API versions by clients and storage, and more. Groups and versions are intended to provide more cohesive API facets while still allowing some resources to evolve independently without rapidly churning through major API versions. We could retcon less mature API groups, but that's extremely unintuitive for users IMO. We could put different subsets of resources into different versions of the same API group, but that has many of the same problems as independent versioning for each resource, and has some additional issues and would require extensions to our discovery API. We could include Experimental, Alpha, or Beta in the names of new resources and just put them in more mature API groups, but that feels incongruous with the whole approach to versioning. I realize that we've discussed doing exactly this with fields. The other option I've thought about recently is moving to semantic versioning and including minor versions in the API version, such as when adding new fields and new objects. To me, that would make the versions in the names of objects and fields both more workable, because we could apply our conversion machinery in future versions, and palatable, since it could be used in conjunction with the primary versioning scheme. Part of our problem is self-inflicted, due to our rush to advance API groups before they are fully baked. If we weren't doing that, we could just keep groups in alpha or beta a little longer, add more resource types, and then promote them when the groups were actually ready. v1beta1 (which should have been alpha, but whatever) existed for over a year before we moved to v1beta3. How many of our post-v1 APIs did we put through more than one alpha or beta? |
It seems like this will result in a very busy API group with numerous, unrelated types in various stages of out-of-dateness. And that doing this will result in a nearly 100% chance that clients will have to change API groups to access the same resource as the API solidifies. Are those characteristics intentional goals or are they side-effects because of the pain around creating new API groups? |
Agree that if extensions was v1alpha1 this would be an easier discussion.
However, API groups have to be able to introduce and version types
completely independently of each other - an OpenShift API object is
not going to show up in extensions, and using it as a grab bag for
core Kube resources I think is working against the goals for API
groups to be independent chunks of function and to enable us to better
firewall the implementations. scale, for instance, was a mistake.
I think semantic versions on APIs can be harder for clients and for
ourselves than some of the alternatives - agree that I want a way to
flag a unique snapshot, but that has many of the same problems of per
resource versions. I would want to discuss a practical example in
more detail in a group setting before going further.
I think I would argue that PV + PVC is a great example of two
resources that would be in a group, and where the group version of the
two are related. On the other hand, we are never going to be able to
orchestrate a backward incompatible ObjectMeta change within the same
version value (which is why the server cast proposal is needed), so we
have to accept that version names across groups are unrelated.
I think we need to give the API versioning discussions some more
attention prior to 1.5. We have rushed multiple objects to early
beta, put objects in the wrong group, and caused ourselves security
problems along the way. I'd like to see a proposal we all agree on
for promotion and a better process for agreeing something goes into a
group. I also think we need to formalize API review a bit more -
there's an increasing amount of changes and a lot more committers, and
reviewers need to know these rules as well.
|
On a related note to David question - Openshift is about to create 13
new API groups. If we need to make API group creation easier, we're
going to do it. But if we can't even agree on what groups are for, we
will be in trouble.
|
I think there should be a clear rubric in writing that specifies exactly when/where to add an API group before this issue is closed. |
We discussed the pros and cons in sig-api-machinery yesterday. Choosing a particular group name means that clients (including our internal code) require less work and re-swizzling to handle promotions between versions. Even if you choose a group you end up not liking, the amount of work remains the same as the incubator work case. opened #31886 |
Just saw this. For batch, we did rev to v2alpha1 when adding a kind (ScheduledJob) which was alpha, even though the other thing in the group was v1 (Job). If we hadn't done that:
We could move to a new model where we signal alpha differently (E.g. all the field names in the type or the Kind name starts with How can we decide these issues and then document them, before we add lots more groups? |
I'll note that doing that broke every bit of API machinery which
wasn't adequately ready for it. So we also need to be sure we've
fixed the underlying problems before we go everywhere else (@soltysh
do you have follow up issues for your hacks there?)
|
Yes, v2alpha1 was not easy, so I'd love to have a different path that didn't involve more apiversions. |
yeah, we need some huddle early in 1.5 to figure this out. On Thu, Sep 8, 2016 at 10:59 AM, Eric Tune notifications@github.com wrote:
|
batch/v2alpha1 was a trailblazer. The trail should be easier for others now We did discuss in the last api machinery sig dropping the requirement that On Thu, Sep 8, 2016 at 11:25 AM, Tim Hockin notifications@github.com
|
I don't think that is more intuitive. If these are "api groups" I would On Thu, Sep 8, 2016 at 11:29 AM, Daniel Smith notifications@github.com
|
Technically each kind already has its own version because we change them at On Thu, Sep 8, 2016 at 2:32 PM, Tim Hockin notifications@github.com wrote:
|
Specifically we were talking about having a sort of rotating alpha group On Thu, Sep 8, 2016 at 12:31 PM, Clayton Coleman notifications@github.com
|
Right. That combined with a preference ordering of versions that places "alpha" last would allow clients to find the latest stable version of a resource if it exists, the latest bleeding edge if they want, and by having sparse versions we'll get to eliminate duplication between versions. |
Yeah, quite a few of them are on my list, just earlier today I hit dynamic client not working properly with
Since batch is the trail blazer here, I'd say continue to evaluate options on it, since with the 'maturity' it's easier to spot what's broken when changing and not only after. Should I read it that instead of |
I don't think we have a firm decision yet. Sparse versions have maintenance merit, but there are reasonable arguments against them too. |
Moving out of v1.4 as this is a P2. |
Do we want to repurpose this as "discuss apigroup versioning" ? |
Yes On Sep 15, 2016, at 1:45 AM, Tim Hockin notifications@github.com wrote: Do we want to repurpose this as "discuss apigroup versioning" ? — |
This needs to be triaged as a release-blocker or not for 1.5 @deads2k @smarterclayton @lavalamp |
already fixed |
The
extensions
group isn't meant to be an incubator group, its intended to hold the things already in it, resources directly related, andthirdpartyresource
. We've actually gone to some effort to migrate some types out:HPA
andJobs
as a for instance.Different APIs want to move at different cadences and new resources should start off in an alpha version while they sort out what they really need during their implementation phases.
We tagged an alpha of 1.4, but I think we should move these resources into their own group. I suspect they'll want new versions at a cadence to match the storage controllers, not a cadence locked to the rest of the
extensions
API.@childsb @kubernetes/rh-cluster-infra @kubernetes/sig-api-machinery
Assigned to @lavalamp so he'll be sure to notice and weigh in here, not as a final destination.
The text was updated successfully, but these errors were encountered: