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

Identical deployments in different namespaces #147

Closed
anton-johansson opened this issue May 9, 2019 · 6 comments · Fixed by #156
Closed

Identical deployments in different namespaces #147

anton-johansson opened this issue May 9, 2019 · 6 comments · Fixed by #156

Comments

@anton-johansson
Copy link

I have two identical statefulsets (would be the same for deployment too, I suppose), in two different namespaces. They have the same name of the set, same name of the service, and they have the same labels.

They both work in terms of "pure" k8s. They control their own three pods, respectively.

However, one of the sets keep getting evicted by descheduler. I assume the descheduler does not consider namespace of the pods? Is this intended?

@anton-johansson
Copy link
Author

anton-johansson commented May 9, 2019

https://github.com/kubernetes-incubator/descheduler/blob/fc1688057aecc30dceb4d67c5b270446f32b02a9/pkg/descheduler/strategies/duplicates.go#L92

This is probably the cause of it. Can't we use the ownerReferences[].uid instead of ownerReferences[].kind + ownerReferences[].name?

PS: I'll gladly contribute to this to get myself into the development. Just need confirmation/guidance that this is the right way.

@tammert
Copy link
Contributor

tammert commented May 15, 2019

@anton-johansson , we were having the same issue and I can confirm your solution of using ownerRef.UID instead of ownerRef.Kind + ownerRef.Name fixes this just nicely! Thanks for that.

I'm not affiliated to this project though, so you might want to check with @aveshagarwal if he would accept a pull request for this. FYI, just using ownerRef.UID makes for much vaguer log messages, so you might want to keep that in mind (maybe add the UID to the string instead of replacing it).

@aveshagarwal
Copy link
Contributor

@anton-johansson @tammert please feel free to submit a PR as that sounds like an issue.

@tammert
Copy link
Contributor

tammert commented May 16, 2019

@anton-johansson let me know if you want to make a PR, otherwise I'll be happy to contribute it!

@anton-johansson
Copy link
Author

anton-johansson commented May 24, 2019

@tammert, I would love to, but I don't see myself having the time for it right now. Feel free to work on it!

Sorry for the delayed response.

@tammert
Copy link
Contributor

tammert commented May 24, 2019

@anton-johansson no worries, glad you responded! I've created the PR for @aveshagarwal to review: PR #156.

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 a pull request may close this issue.

3 participants