Skip to content

Commit

Permalink
Timeout in crd deletion force delete (Azure#5339)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-dassani authored Sep 12, 2022
1 parent c15670e commit 36b8b36
Show file tree
Hide file tree
Showing 4 changed files with 736 additions and 246 deletions.
5 changes: 5 additions & 0 deletions src/connectedk8s/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Release History
===============
1.3.3
++++++

* Added a timeout in force delete's CRD deletion command

1.3.2
++++++

Expand Down
4 changes: 3 additions & 1 deletion src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,10 @@ def delete_connectedk8s(cmd, client, resource_group_name, cluster_name,
delete_cc_resource(client, resource_group_name, cluster_name, no_wait).result()

# Explicit CRD Deletion

timeout_for_crd_deletion = "20s"
for crds in consts.CRD_FOR_FORCE_DELETE:
cmd_helm_delete = [kubectl_client_location, "delete", "crds", crds, "--ignore-not-found"]
cmd_helm_delete = [kubectl_client_location, "delete", "crds", crds, "--ignore-not-found", "--wait", "--timeout", "{}".format(timeout_for_crd_deletion)]
response_helm_delete = Popen(cmd_helm_delete, stdout=PIPE, stderr=PIPE)
_, error_helm_delete = response_helm_delete.communicate()

Expand Down
Loading

0 comments on commit 36b8b36

Please sign in to comment.