-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
Add API for StorageClasses #29694
Add API for StorageClasses #29694
Conversation
@childsb |
i'll add them, thanks @pmorie |
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||
|
||
// Provisioner indicates the type of the provisioner. | ||
Provisioner string `json:"provisioner,omitempty" protobuf:"bytes,2,opt,name=provisioner"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be omitempty
ObjectNameFunc: func(obj runtime.Object) (string, error) { | ||
return obj.(*extensions.StorageClass).Name, nil | ||
}, | ||
PredicateFunc: func(label labels.Selector, field fields.Selector) generic.Matcher { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PredicateFunc: storageclass.MatchStorageClasses,
I looked into:
I added one nit, other than that lgtm. |
|
||
client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) | ||
|
||
ns := framework.CreateTestingNamespace("storageclass", s, t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You actually do not need to create a namespace for this test -- storage class is a global resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namespace is used for a PVC in the test.
I am LGTM on this. Paul? If you're good, go ahead and apply the label. |
@childsb - please squash commits before merging |
b666892
to
f5bd7d4
Compare
GCE e2e build/test passed for commit f5bd7d4. |
LGTM. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit f5bd7d4. |
Automatic merge from submit-queue |
Automatic merge from submit-queue make reousrce prefix consistent with other registries Storage class registry was added recently in #29694. In other registries, resource prefix was changed to a more generic way using RESTOptions.ResourcePrefix. This PR is an attempt to make both consistent.
@childsb @lavalamp @kubernetes/sig-api-machinery Why did these types end up in We tagged an alpha of 1.4, but I think we should consider moving these. I suspect they'll want new versions at a cadence to match the storage controllers, not a cadence locked to the rest of this API. |
Brian and I discussed this at length. The idea is that we need to be able So we agreed we need an incubator group for beta types. We already have On Fri, Aug 26, 2016 at 7:22 AM, David Eads notifications@github.com
|
Why couldn't a new kind be incubated in its own API group which can be separately versioned so that when you're done or if you want to make changes, you can do so at your own cadence? Adding API objects to Doing it like this has not only locked this object immediately (no breaking changes for an incubating type?), but you'll now experience migration pain as you try to move it out of incubation to its own group. |
On Fri, Aug 26, 2016 at 9:42 AM, David Eads notifications@github.com wrote:
In this particular case, we could make a new group. In general we
We need an answer to this whole problem in general. I am not happy |
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". |
so if we had "incubator" instead of "extensions" you'd be less unhappy? On Fri, Aug 26, 2016 at 10:23 AM, David Eads notifications@github.com
|
IMO extensions is a bit of an incubator, since we turn resources on and off On Fri, Aug 26, 2016 at 9:57 AM, Tim Hockin notifications@github.com
|
This is the API objects only required for dynamic provisioning picked apart from the controller logic.
Entire feature is here: #29006