Skip to content

Commit

Permalink
Fix Kubeflow cleanup for Juju 2.8+ (#2649)
Browse files Browse the repository at this point in the history
Fixes issue where admission-webhook would leave behind a webhook that
would attempt to talk to the non-existent admission-webhook service,
blocking all attempts to create a new Pod.
  • Loading branch information
knkski authored Oct 13, 2021
1 parent 63845ce commit c37ce35
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions microk8s-resources/actions/disable.kubeflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def kubeflow():
resources = [
("mutatingwebhookconfigurations", ""),
("validatingwebhookconfigurations", ""),
("customresourcedefinitions", ",juju-app notin (kubeflow-dashboard)"),
("customresourcedefinitions", ",app.kubernetes.io/name notin (kubeflow-dashboard)"),
("clusterroles", ""),
("clusterrolebindings", ""),
]
Expand All @@ -52,7 +52,12 @@ def kubeflow():
click.echo(f"Destroying Kubeflow {resource}...")
try:
subprocess.check_call(
["microk8s-kubectl.wrapper", "delete", resource, "-ljuju-app" + selector],
[
"microk8s-kubectl.wrapper",
"delete",
resource,
"-lapp.kubernetes.io/name" + selector,
],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand Down

0 comments on commit c37ce35

Please sign in to comment.