Skip to content

Commit

Permalink
feat: force disconnect cluster (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjmao authored Jan 25, 2022
1 parent f9a5c0a commit d58a940
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion actions/disconnect_cluster_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func (c *disconnectClusterHandler) Handle(ctx context.Context, data interface{})
}

c.log.Infof("deleting namespace %q", ns)
if err := c.client.CoreV1().Namespaces().Delete(ctx, ns, metav1.DeleteOptions{}); err != nil {
gracePeriod := int64(0) // Delete immediately.
if err := c.client.CoreV1().Namespaces().Delete(ctx, ns, metav1.DeleteOptions{GracePeriodSeconds: &gracePeriod}); err != nil {
return fmt.Errorf("deleting namespace %q: %v", ns, err)
}

Expand Down

0 comments on commit d58a940

Please sign in to comment.