-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Pod templates as their own type #5012
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits. Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name. |
479199e
to
e262f92
Compare
e262f92
to
9dfbc56
Compare
Thanks!! The main change is now the next-to-last commit. :-) I'm fine with the API. I can see the benefit of an explicit template. One thing to consider for separate templates: We may want to allow users to specify the resourceVersion of the template in the ObjectReference (the necessary field already exists) and force the replication controller to observe the specified version before it creates any new pods, for WAW consistency, if the user cares. When this is ready for full review, let me know, though I may need to punt it to someone else. |
I'm fine with this being v1beta3 only. I want to finalize v1beta3 and flip to it as the default asap. Looking at the json, I see why you changed "spec" to "template". My main concern is whether we might add status in the future, such as to publish the last time the template was used to create a pod. |
I could certainly imagine a status in the future. Is an object that behaves like a template having a root "template" field better (obviousness) vs encouraging others to invent things besides spec. My thought was that spec is a real object which is converged, while a template isn't. Might be good to get a few other opinions.
|
@smarterclayton You're logic is reasonable. I don't really want to bikeshed on this particular topic. Let's go with template. |
9dfbc56
to
1da56ae
Compare
Is this PR active? If not please close it according to https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/devel/pull-requests.md |
Yes
|
1da56ae
to
dff885b
Compare
Rebased and ready to use. |
Ready for review |
Cool, thanks. Will take a look. You're getting a gendocs failure due to the addition of a new noun. |
/subscribe |
Yes ----- Original Message -----
|
} | ||
|
||
// NewREST returns a RESTStorage object that will work against pod templates. | ||
func NewREST(h tools.EtcdHelper) *REST { |
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.
Love how simple this is now.
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.
Yeah, reduced about 5k lines from openshift code base.
dff885b
to
5114242
Compare
Comments addressed. |
Please regenerate the kubectl docs. |
LGTM. Waiting for Travis. |
|
Weird. |
Rerunning Travis. I have no idea what happened. Looks like Template to me. |
Hmm. Still fails. |
4c7f66c
to
e0b60b9
Compare
Fixed, merge changes coming in. ----- Original Message -----
|
Thanks. Tests passed, but needs to be rebased, apparently. |
e0b60b9
to
09d86b5
Compare
Rebased and travis is green |
Pod templates as their own type
This pull request adds pod templates as their own type (first step towards #170). Having
a distinct type allows their use to be clearly delineated for end users, to have their
own independent validation rules, and to simplify interactions from the client. This does
not prevent pods from having "inert" behavior in the future that can also be used for
templates. Replication controllers should work against inert pods or pod templates equally.
Only the last commit is new - the others are issues found while trying to support a
type that only exists in v1beta3.