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

Support rebalancing Deployments across Clusters #105

Closed
wants to merge 1 commit into from

Conversation

imjasonh
Copy link
Contributor

@imjasonh imjasonh commented Jun 15, 2021

Instead of only creating leaf Deployments, also update and delete
existing leafs. This means that as Clusters are added and become Ready,
Deployments' replicas will be rebalanced across ready clusters, and as
they get deleted or become un-Ready, they'll rebalance across ready
clusters.

This is incomplete: cluster creations/deletions/changes won't trigger
root deployment reconciliations as of this change.

This also adds unit tests and configures CI to run tests.

(Also fix some lint errors and style nits)

edit: This PR has also grown to include DaemonSet and Pod scheduling, not hooked up to any controller, to demonstrate how they'd work in unit tests. These are examples of different scheduling strategies we'd like to generalize and apply to other arbitrary types.

Instead of only creating leaf Deployments, also update and delete
existing leafs. This means that as Clusters are added and become Ready,
Deployments' replicas will be rebalanced across ready clusters, and as
they get deleted or become un-Ready, they'll rebalance across ready
clusters.

Deployments will be re-reconciled when any Cluster is created, updated
or deleted.

This change also includes WIP support for DaemonSets and Pods though
these aren't hooked up with controllers, only unit tests.
Copy link
Member

@davidfestal davidfestal left a comment

Choose a reason for hiding this comment

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

I tested this with the kubecon demo (after rebasing on main branch and fixing conflicts) and it worked as expected.
So approving !

@ncdc
Copy link
Member

ncdc commented Nov 19, 2021

@imjasonh is this something we want to carry forward and eventually merge?

@imjasonh imjasonh closed this Nov 19, 2021
@imjasonh
Copy link
Contributor Author

@imjasonh is this something we want to carry forward and eventually merge?

Nope, I think we can drop this. The namespace scheduler will take over as the way to move deployments (and anything) around, and eventually deployment-splitter can just be deleted.

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

3 participants