siderolabs / omni

SaaS-simple deployment of Kubernetes - on your own hardware.
Other
481 stars 26 forks source link

feat: implement kubernetes node audit controller #150

Closed utkuozdemir closed 4 months ago

utkuozdemir commented 4 months ago

Clean up invalid nodes (from the Kubernetes perspective) from the cluster if they are no longer part of a cluster from the perspective of Omni.

Introduce a new intermediate resource, ClusterKubernetesNodes, containing the ordered list of nodes in a cluster.

Create the resource, KubernetesNodeAuditResult, to provide a summary on the latest deleted nodes from the Kubernetes cluster.

Closes siderolabs/omni#9.

utkuozdemir commented 4 months ago

I think we should have an integration test for it.

Also we need to skip deleting nodes which are Ready?

already doing the Ready check here:https://github.com/siderolabs/omni/pull/150/files#diff-f856c47e45cecba4018f26b99f4529186e842968b8a8a6acf6201f6bbaec9d61R230-R234 and is tested here: https://github.com/siderolabs/omni/pull/150/files#diff-181a0e188b1644c2cabab30214f26546f614735afbd6f6bf47aa0616b24d1991R84-R95 & https://github.com/siderolabs/omni/pull/150/files#diff-181a0e188b1644c2cabab30214f26546f614735afbd6f6bf47aa0616b24d1991R108-R111

Will add an integration test.

Unix4ever commented 4 months ago

Just remembered: we also need to drop MachineSet dependency in the cluster machine teardown controller. But please run all e2e tests after that: especially e2e scaling.

utkuozdemir commented 4 months ago

/m