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

Destroy gardener-resource-manager early in the shoot deletion flow #5466

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/gardenlet/controller/shoot/shoot_control_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ func (r *shootReconciler) runDeleteShootFlow(ctx context.Context, o *operation.O
Fn: flow.TaskFn(botanist.Shoot.Components.ControlPlane.KubeAPIServerService.Destroy).RetryUntilTimeout(defaultInterval, defaultTimeout),
Dependencies: flow.NewTaskIDs(deleteKubeAPIServer, destroyKubeAPIServerSNI),
})
_ = g.Add(flow.Task{
Name: "Destroying gardener-resource-manager",
Fn: flow.TaskFn(botanist.Shoot.Components.ControlPlane.ResourceManager.Destroy),
Dependencies: flow.NewTaskIDs(deleteKubeAPIServer),
})
ialidzhikov marked this conversation as resolved.
Show resolved Hide resolved

destroyControlPlaneExposure = g.Add(flow.Task{
Name: "Destroying shoot control plane exposure",
Expand Down
2 changes: 1 addition & 1 deletion pkg/operation/botanist/controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (b *Botanist) HibernateControlPlane(ctx context.Context) error {
}

// TODO: check if we can remove this mitigation once there is a garbage collection for VolumeAttachments (ref https://github.com/kubernetes/kubernetes/issues/77324)
// Currently on hibernation Machines are forecefully deleted and machine-controller-manager does not wait volumes to be detached.
// Currently on hibernation Machines are forcefully deleted and machine-controller-manager does not wait volumes to be detached.
// In this case kube-controller-manager cannot delete the corresponding VolumeAttachment objects and they are orphaned.
// Such orphaned VolumeAttachments then prevent/block PV deletion. For more details see https://github.com/gardener/gardener-extension-provider-gcp/issues/172.
// As the Nodes are already deleted, we can delete all VolumeAttachments.
Expand Down