-
Notifications
You must be signed in to change notification settings - Fork 38.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
initial types for TPRs #45115
initial types for TPRs #45115
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deads2k Assign the PR to them by writing
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
dbb608a
to
9d6b5a2
Compare
|
||
// CustomResourceNames indicates the names to serve this CustomResource | ||
type CustomResourceNames struct { | ||
// Plural is the plural name of the resource to serve. It must match the name of the TPR-registration |
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.
Would also mention "lower-case" here.
@@ -0,0 +1,116 @@ | |||
/* | |||
Copyright 2016 The Kubernetes Authors. |
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.
nit: 2017
|
||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
// CustomResourceSpec describe how a user wants their resource to appear |
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.
nit: describes
Conditions []CustomResourceCondition | ||
|
||
// AcceptedNames are the names that are actually being used to serve discovery | ||
// They may be different than the names in spec. |
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.
different = a subset?
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.
Forseeing clients which do complicated comparison logic whether everything specified is actually accepted. Can we at least express this with a boolean Accepted: Partially/Complete
?
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.
different = a subset?
No, different. Imagine someone changing their shortnames. The status may have values not present in the spec.
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.
Can we at least express this with a boolean Accepted: Partially/Complete ?
It would set the nameconflict condition.
Looks good from my side as a first step. As nothing is exposed yet, we can freely change types and names in a follow-up if necessary. |
@k8s-bot verify test this |
@ericchiang Anything to add at the moment? I'm flexible on names both now and later. |
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.
Types work for me. One question about the API group name.
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 |
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.
Hm, I had assumed this would be a beta group based on the proposal.
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.
Hm, I had assumed this would be a beta group based on the proposal.
I really want to make it to beta, but I don't want to rush it and later regret it. If we decide this API is actually good enough to be beta, I'm fine with simply switching it later this release or adding a congruent file next release.
Looks like there's enough consensus to move forward with a non-exposed API like this. I am flexible about changing these names and I've opened #45277 to make sure that's well known. I'm going to tag this so we can get a critical mass available for dealing with the issues around actually making it work and playing with migration cases. |
Automatic merge from submit-queue (batch tested with PRs 45272, 45115) |
Automatic merge from submit-queue (batch tested with PRs 45182, 45429) CustomResources in separate API server Builds on #45115. This adds a basic handler for custom resources. No status handling, no finalizers, no controllers, but basic CRUD runs to allow @enisoc and others to start considering migration. @kubernetes/sig-api-machinery-misc
This pull starts creating the types described by https://github.com/kubernetes/community/blob/master/contributors/design-proposals/thirdpartyresources.md . In the initial pull different names were suggested. I've started this pull with
CustomResource.apiextensions.k8s.io
.The structure begins as a separate API server to facilitate rapid prototyping and experimentation, but the end result will be added to the end of the
kube-apiserver
chain as described in https://github.com/kubernetes/community/blob/master/sig-api-machinery/api-extensions-position-statement.md .Because it is separate to start (not included in any default server), I don't think we need a perfect name, but I'd like to be close.
@kubernetes/sig-api-machinery-misc @enisoc @smarterclayton @erictune