Skip to content

Commit

Permalink
Destroy gardener-resource-manager early in the shoot deletion flow
Browse files Browse the repository at this point in the history
  • Loading branch information
vpnachev committed Feb 18, 2022
1 parent 919c358 commit 0654af9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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),
})

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

0 comments on commit 0654af9

Please sign in to comment.