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

Central cleanup job for Shoot clusters on KCP DEV #3480

Open
4 tasks
tobiscr opened this issue Sep 18, 2024 · 1 comment
Open
4 tasks

Central cleanup job for Shoot clusters on KCP DEV #3480

tobiscr opened this issue Sep 18, 2024 · 1 comment
Labels
area/control-plane Related to all activities around Kyma Control Plane kind/feature Categorizes issue or PR as related to a new feature.

Comments

@tobiscr
Copy link
Contributor

tobiscr commented Sep 18, 2024

Description

We use currently two cleanup mechanisms for removing shoot-clusters on KCP DEV.

One is executed by KEB and removes Shoot-clusters which were created by KEB. Another job was running decoupled from KEB and removed shoot-clusters created by Provisioner.

To simplify the cleanup approach, a single cleanup job should be preferred. This job retrieves all Shoots from Gardener cluster and verifies whether they are known by KEB. If they are unknown, the cleanup mechanism will delete this cluster, independent who created it:

Created by Shoot deleted by cleanup job via
KEB KEB executes its deletion logic
KIM Removing the RuntimeCR
Gardener-UI Removing the Shoot-CR on Gardener cluster

The deletion has to consider the case, that a Shoot-CR can be marked with the label owner.do-not-delete: '<bool>'. Before a cluster is deleted, the cleanup job has to check the existence respectively the value of the label on the Shoot CR.

AC:

  • A job is implemented which retrieves all Shoot-CR on KCP DEV
  • The job verifies if the Shoot-cluster is known by KEB, if the cluster is unknown or marked for deletion, the cluster-deletion logic will be trigger
  • the deletion of a Shoot-cluster is only allowed if the be Shoot-CR does not contain the owner.do-not-delete label or if the value of the label is false.
  • the deletion of the cluster happens independent to the creator, means the deletion logic tries to;
    1. delete the cluster in the provisioner
    2. delete the Runtime CR
    3. delete the Shoot-CR

Reasons

Simplify KCP DEV housekeeping by centralising the shoot-cluster deletion job.

Attachments

@tobiscr tobiscr added kind/feature Categorizes issue or PR as related to a new feature. area/control-plane Related to all activities around Kyma Control Plane labels Sep 18, 2024
@tobiscr tobiscr transferred this issue from kyma-project/infrastructure-manager Sep 18, 2024
@tobiscr
Copy link
Contributor Author

tobiscr commented Sep 26, 2024

@kyma-project/gopher / @PK85 - will you take it over?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane Related to all activities around Kyma Control Plane kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant