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

Improve Cluster deletion #682

Closed
2 tasks done
Tracked by #600
cornelius-keller opened this issue Jan 10, 2022 · 7 comments
Closed
2 tasks done
Tracked by #600

Improve Cluster deletion #682

cornelius-keller opened this issue Jan 10, 2022 · 7 comments
Assignees
Labels
area/kaas Mission: Cloud Native Platform - Self-driving Kubernetes as a Service epic/capo team/rocket Team Rocket

Comments

@cornelius-keller
Copy link
Contributor

cornelius-keller commented Jan 10, 2022

  • Cluster deletion handle cleanup of cinder csi pv (will be a leftover, but don't block deletion)
  • cluster deletion is broken when there exists a svc load balancer. (blocking deletion) .
@cornelius-keller cornelius-keller added area/kaas Mission: Cloud Native Platform - Self-driving Kubernetes as a Service epic/capo team/rocket Team Rocket labels Jan 10, 2022
@cornelius-keller
Copy link
Contributor Author

@ericgraf This issue was created out of notes from you in team rocket inbox. Questions for refinement:

  • do we need a web hook preventing cluster deletion in those cases?
  • is this happening with capo deletion or is this an improvement to our cleanup scripts.

@cornelius-keller
Copy link
Contributor Author

cornelius-keller commented Jan 10, 2022

@cornelius-keller ask in kaas sync:

  • if this is happening on other platforms as well.
  • if we can have a generic web hook for capi clusters that checks if there is still pvs and svc type load balancer.

@cornelius-keller cornelius-keller added this to the CAPI Openstack Beta milestone Jan 11, 2022
@marians marians changed the title Improve Cluster deleteion Improve Cluster deletion Jan 12, 2022
@ericgraf
Copy link

From KAAS.

  • It is expected behaviour that we clean up all resources that we create ( ie pvcs, loadblanacers , etc... )
  • This seems to be a capo specific issue. Azure does sometimes also have left over resources but doesn't block the deletion.
  • If we do a finalizer to block deletion we should make sure it's openstack specific crs
  • CAPO should be able to delete the cluster even it is blocked by resources it didn't create. ( cloud-provider-openstack creates the svc loadbalancer )
  • A custom operator for CAPO might be required to handle this.

@erkanerol erkanerol self-assigned this Jan 17, 2022
@erkanerol
Copy link

Related issue in upstream repo: kubernetes-sigs/cluster-api-provider-openstack#842

@erkanerol
Copy link

Solution Requires working WC Requires touching OpenStack Extendability for other types
Cleaning OpenStack Resources NO YES Depends on support in openstack tools
Cleaning Kubernetes Resources in WC YES NO YES
Blocking cluster deletion YES NO YES

Cleaning OpenStackResources:

  • In CAPO+CPO, tagging resources with cluster name
  • Adding a new operator which deletes OpenStack resources for a deleting cluster by using tags
  • Add volumes metadata #710

Cleaning Kubernetes Resources in WC:

  • Adding a new operator or a pre-delete helm hook with a k8s job
  • The job can run in MC or in WC

Blocking Cluster Deletion:

  • By using ValidatingAdmissionWebhook in MC

@erkanerol
Copy link

We are going to deploy a new operator which cleans loadbalancers&volumes created by users for the WC.

The repo of the operator: https://github.com/giantswarm/cluster-api-cleaner-openstack

@erkanerol
Copy link

The new operator is running in all OpenStack clusters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kaas Mission: Cloud Native Platform - Self-driving Kubernetes as a Service epic/capo team/rocket Team Rocket
Projects
None yet
Development

No branches or pull requests

3 participants