Skip to content

Commit ba93b80

Browse files
authored
Delete statefulsets on reset (#3135)
1 parent 0f42797 commit ba93b80

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/wrappers/reset.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ def exit_if_multinode():
4141
sys.exit(0)
4242

4343

44-
def disable_addon(repo, addon, args=[]):
44+
def disable_addon(repo, addon, args=None):
4545
"""
4646
Try to disable an addon. Ignore any errors and/or silence any output.
4747
"""
48+
if args is None:
49+
args = []
4850
wait_for_ready(timeout=30)
4951
script = snap_common() / "addons" / repo / "addons" / addon / "disable"
5052
if not script.exists():
@@ -116,7 +118,7 @@ def clean_cluster():
116118
nss = []
117119
if res:
118120
nss = res.split()
119-
resources = ["replicationcontrollers", "daemonsets", "deployments"]
121+
resources = ["replicationcontrollers", "daemonsets", "deployments", "statefulsets"]
120122
for ns in nss:
121123
ns_name = ns.split("/")[-1]
122124
print(f"Cleaning resources in namespace {ns_name}")

0 commit comments

Comments
 (0)