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

Cleanup microcluster/k8s when scaling down cluster nodes #15

Merged
merged 10 commits into from
Jun 28, 2024

Conversation

bschimke95
Copy link
Contributor

Summary

Remove nodes from microcluster and k8s when scaling down the cluster.

Notable changes

  • Moved k8sd-proxy requests into generic separate function
  • Added k8sd-proxy blacklist options to ensure the proxy is not targeting the machine that is removed
  • Added RemoveMachineFromCluster method to workload cluster

Tests

Manual tests for now:

  • Created 4 CP node cluster - removed 1 of them again
    -> verified on remaining nodes that node is removed from microcluster and roles are updated
  • Created 1 CP, 1 worker cluster - removed worker
    -> verified that worker is removed from k8s

@bschimke95 bschimke95 requested a review from neoaggelos as a code owner June 25, 2024 07:26
@bschimke95 bschimke95 force-pushed the KU-963/node-deletion branch from 80b4d07 to 4b98cbe Compare June 25, 2024 07:27
controlplane/controllers/scale.go Outdated Show resolved Hide resolved
controlplane/main.go Show resolved Hide resolved
Copy link
Contributor

@neoaggelos neoaggelos left a comment

Choose a reason for hiding this comment

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

Great work

bootstrap/controllers/ck8sconfig_controller.go Outdated Show resolved Hide resolved
bootstrap/controllers/ck8sconfig_controller.go Outdated Show resolved Hide resolved
controlplane/controllers/scale.go Outdated Show resolved Hide resolved
controlplane/controllers/scale.go Outdated Show resolved Hide resolved
controlplane/controllers/scale.go Outdated Show resolved Hide resolved
pkg/ck8s/workload_cluster.go Outdated Show resolved Hide resolved
pkg/ck8s/workload_cluster.go Outdated Show resolved Hide resolved
pkg/ck8s/workload_cluster.go Outdated Show resolved Hide resolved
pkg/ck8s/workload_cluster.go Outdated Show resolved Hide resolved
bschimke95 and others added 2 commits June 25, 2024 14:27
pkg/ck8s/workload_cluster.go Outdated Show resolved Hide resolved
pkg/ck8s/workload_cluster.go Outdated Show resolved Hide resolved
@bschimke95 bschimke95 force-pushed the KU-963/node-deletion branch from c53029b to b69ba7b Compare June 26, 2024 14:34
@bschimke95 bschimke95 requested a review from neoaggelos June 27, 2024 06:57
Copy link
Contributor

@neoaggelos neoaggelos left a comment

Choose a reason for hiding this comment

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

LGTM!

pkg/ck8s/workload_cluster.go Show resolved Hide resolved
@bschimke95 bschimke95 merged commit 7bac9bc into main Jun 28, 2024
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.

2 participants