-
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
Detect if replicas have been defaulted in rolling-update and use old replica count #10234
Detect if replicas have been defaulted in rolling-update and use old replica count #10234
Conversation
Thanks. I'll try to take a look as soon as I can, but not assigning to myself since I'm at Dockercon today. @smarterclayton might also want to take a look. Vaguely related to #7111, which (among other things) discusses decoupling unmarshaling from conversion. |
I'll try although I'm at Red Hat Summit :)
|
5ebfacd
to
0f9aece
Compare
Namespace: namespace, | ||
Name: name, | ||
var versionedInfo *VersionedInfo | ||
versionedObj, _, _, err := api.Scheme.Raw().DecodeToVersionedObject(data) |
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.
I'm pretty sure you don't need to add a VersionedInfo object to Info
. The api version is already available via Info.Mapping
which is a RESTMapping.
0f9aece
to
9a80f24
Compare
@@ -990,7 +990,7 @@ type PodTemplateList struct { | |||
// ReplicationControllerSpec is the specification of a replication controller. | |||
type ReplicationControllerSpec struct { | |||
// Replicas is the number of desired replicas. |
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 be helpful for comment to mention that it's a pointer to distinguish between explicitly zero and unspecified.
99300ad
to
f9b520d
Compare
@@ -66,6 +66,10 @@ type Info struct { | |||
Namespace string | |||
Name string | |||
|
|||
// Optional, this is the provided object in a versioned type before defaulting | |||
// and conversions into it's corresponding internal type. This is useful for |
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: s/it's/its
LGTM, but @smarterclayton and/or @bgrant0607 should take a look. |
f9b520d
to
df2892a
Compare
GCE e2e build/test passed for commit df2892a38ad77c8507bd2a38ac488ba23f658c13. |
df2892a
to
dd07df0
Compare
LGTM |
ok to merge |
@mikedanese want to kick the jenkins bot to test this? |
@k8s-bot ok to test |
GCE e2e build/test passed for commit dd07df0. |
@roberthbailey k8s-bot says LGTM |
Thanks. gce-e2e just went red so I'll merge once it is happy again. |
Detect if replicas have been defaulted in rolling-update and use old replica count
Fixes #9645
@bprashanth @bgrant0607