Skip to content

Commit c49b9a3

Browse files
committed
Graceful castai-agent namespace deletion
1 parent 625ca57 commit c49b9a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/actions/disconnect_cluster_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (c *DisconnectClusterHandler) Handle(ctx context.Context, action *castai.Cl
4848
})
4949

5050
log.Infof("deleting namespace %q", ns)
51-
gracePeriod := int64(0) // Delete immediately.
51+
gracePeriod := int64(60)
5252
if err := c.client.CoreV1().Namespaces().Delete(ctx, ns, metav1.DeleteOptions{GracePeriodSeconds: &gracePeriod}); err != nil {
5353
return fmt.Errorf("deleting namespace %q: %w", ns, err)
5454
}

0 commit comments

Comments
 (0)