-
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
Migrate replication controllers to generic etcd #5746
Migrate replication controllers to generic etcd #5746
Conversation
Still need to do a little bit of cleanup and write a few more uts, but for the most part I'm convinced this is OK. |
@lavalamp is out until Wednesday (I believe) and I feel bad explicitly giving work to @smarterclayton (as he's in a different org), so temporarily assigning to @davidopp; feel free to redistribute. |
I'll review - I'm in that part of the codebase right now anyway. Don't few bad assigning things to me, but it's somewhat like assigning to Tim or Brian in terms of our ability to review :)
|
I am happy to review as well. I tend to have more time than Clayton and also know this area well :-) Sent from my iPhone
|
Clayton or Derek, if you want to review this please assign it to yourself, otherwise I will review i tthis week. |
|
||
Helper: h, | ||
} | ||
store.CreateStrategy = controller.Strategy |
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.
Move these to struct init fields
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 going to add a subresource for /status, but I guess I'll just do that in the next cl.
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, that's fine then. Leave it.
----- Original Message -----
KeyFunc: func(ctx api.Context, name string) (string, error) {
return etcdgeneric.NamespaceKeyFunc(ctx, controllerPrefix, name)
},
// Retrieve the name field of a replication controller
ObjectNameFunc: func(obj runtime.Object) (string, error) {
return obj.(*api.ReplicationController).Name, nil
},
// Used to match objects based on labels/fields for list and watch
generic.Matcher {PredicateFunc: func(label labels.Selector, field fields.Selector)
return controller.MatchController(label, field)
},
EndpointName: "replicationControllers",
Helper: h,
- }
- store.CreateStrategy = controller.Strategy
I'm going to add a subresource for /status, but I guess I'll just do that in
the next cl.
Reply to this email directly or view it on GitHub:
https://github.com/GoogleCloudPlatform/kubernetes/pull/5746/files#r26963687
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.
Changed anyway, things might happen that prevent that cl from going in so it's cleaner this way.
Two minor comments |
344fae6
to
eda8716
Compare
eda8716
to
ef66016
Compare
PTAL |
LGTM |
Haven't run e2e post rebase yet |
e2e done, this should be good to go |
Migrate replication controllers to generic etcd
The following will silently happen as a byproduct of the migration:
List
won't list try to match labels in controller/rest (because I deleted most of the file).PodLister
.Also dropped controller tick to 5s, because if a pod dies it almost always does so within this time