-
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
Introducing ReplicaSet, a new incarnation of Replication Controller. #19042
Conversation
GCE e2e build/test failed for commit 3f4f4e126ede487252da17b0bb649be4c892f548. |
Labelling this PR as size/XXL |
Replicas int `json:"replicas"` | ||
|
||
// ObservedGeneration is the most recent generation observed by the controller. | ||
ObservedGeneration int64 `json:"observedGeneration,omitempty"` |
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.
As per api-conventions.md, internal types should be int. External type can be int64.
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.
api-convensions.md says "Internal types may use (u)int." here - https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api-conventions.md#primitive-types. Am I missing something here?
Also, I think ObservedGeneration should use int64 for both public and internal types to preserve precision.
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.
@nikhiljindal What in api-conventions.md suggests this can't be int64? We'd lose precision if it were only int.
@madhusudancs Please keep this int64.
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.
ok sorry. looks like I mis-interpreted it.
It says "All public integer fields MUST use the Go (u)int32 or Go (u)int64 types, not (u)int (which is ambiguous depending on target platform). Internal types may use (u)int."
Thanks for separating your code and generated code into separate commits (there is a diff of 18k in the auto-generated code!!). |
3f4f4e1
to
5a0ae65
Compare
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
5a0ae65
to
09b17a9
Compare
CLAs look good, thanks! |
@nikhiljindal No problem. Thanks for the quick review. Have addressed the comments. PTAL. |
GCE e2e build/test failed for commit 5a0ae658c441777c25a239f71964d7362fa25b98. |
GCE e2e test build/test passed for commit 09b17a9586cdb196a098b1764d5db16fbf7e7f0b. |
// TemplateRef is a reference to an object that describes the pod that will be created if | ||
// insufficient replicas are detected. This reference is ignored if a Template is set. | ||
// Must be set before converting to a versioned API object | ||
//TemplateRef *ObjectReference `json:"templateRef,omitempty"` |
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.
Please just remove the TemplateRef comment for now, here and in v1/types.go.
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.
Done.
@bgrant0607 I have also changed the ReplicaSetSpec doc/comment above to
// ReplicaSetSpec is the specification of a ReplicaSet.
// As the internal representation of a ReplicaSet, it must have
// a Template set.
Is that accurate?
GCE e2e test build/test passed for commit d0e70edbbfce1954af18f25e06d97cff5ab0291e. |
d0e70ed
to
7e11821
Compare
GCE e2e test build/test passed for commit 7e11821b93008821cbcf56a94a5101d9d87bc86f. |
Are the first 2 commits intended? |
@nikhiljindal Those two commits being here is intentional, but it shouldn't be merged with this PR though. I am keeping that in mind, but it is better if I also write it down here. Those two commits, along with the commits in this PR are required for the future PRs which build on these changes. There is neither an easy way to define base PRs for a given PR nor is it easy to define two parent PRs for a given PR unless I create an actual merge commit. I am afraid to create a merge commits because it is hard to manage with rebases. So I am ordering the PRs one after the other, with PR #19802 being the first PR followed by this PR. If you think this PR is good to go, I will reorder the PRs, so that those commits disappear from this PR. Let me know. |
7e11821
to
f6f658a
Compare
@nikhiljindal Reordered the PRs, those two commits should have disappeared now. PTAL. |
Labelling this PR as size/XL |
GCE e2e test build/test passed for commit f6f658a69c0edd49389413431a7434c4497f6d28. |
f6f658a
to
951fa9d
Compare
GCE e2e test build/test passed for commit 951fa9dc246ecc79ded61ec768dbb5045c736421. |
LGTM, thanks! |
This commit adds the API types, conversion, validation and defaulting code.
951fa9d
to
572abe1
Compare
GCE e2e test build/test passed for commit 572abe1. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit 572abe1. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit 572abe1. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
This commit adds the API types, conversion, validation and defaulting code.
Ref #3024