Skip to content
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

Make replica controllers return current state. #1248

Merged
merged 2 commits into from Sep 9, 2014

Conversation

brendandburns
Copy link
Contributor

No description provided.

@@ -104,6 +105,7 @@ func (rs *REST) List(selector labels.Selector) (runtime.Object, error) {
filtered := []api.ReplicationController{}
for _, controller := range controllers.Items {
if selector.Matches(labels.Set(controller.Labels)) {
rs.fillCurrentState(&controller)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O(N * M) scaling.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, do we care? This is all pretty local.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we care at the moment, but stuff like this will keep us from scaling out of the 100's of pods and rep. controllers.

@brendandburns
Copy link
Contributor Author

I'd prefer to get this in as-is. We can always improve the implementation later to make it watch-able and improve performance.

Your call, though, about how perfect you want this to be before we submit.

@brendandburns
Copy link
Contributor Author

Added the fillCurrentState behavior to the Watch function as well. (clearly changes don't actually trigger a watch event, so it's imperfect)

@lavalamp
Copy link
Member

lavalamp commented Sep 9, 2014

LGTM. I'll let this go until we have @erictune's indexing thingy available.

lavalamp added a commit that referenced this pull request Sep 9, 2014
Make replica controllers return current state.
@lavalamp lavalamp merged commit 4891367 into kubernetes:master Sep 9, 2014
@brendandburns brendandburns deleted the replicas branch August 7, 2015 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants