Skip to content

Commit

Permalink
[Cleanup] Fix crd objects cleanup (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedingber committed Dec 15, 2020
1 parent 50cb450 commit 92e5c84
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions mlrun/runtimes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from os import environ
from typing import Dict, List, Tuple, Union, Optional

from kubernetes import client
from kubernetes.client.rest import ApiException
from sqlalchemy.orm import Session

Expand Down Expand Up @@ -1392,12 +1391,7 @@ def _delete_crd(namespace, crd_group, crd_version, crd_plural, crd_object):
name = crd_object["metadata"]["name"]
try:
k8s_helper.crdapi.delete_namespaced_custom_object(
crd_group,
crd_version,
namespace,
crd_plural,
name,
client.V1DeleteOptions(),
crd_group, crd_version, namespace, crd_plural, name,
)
logger.info(
"Deleted crd object",
Expand Down
1 change: 0 additions & 1 deletion tests/api/runtime_handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ def _assert_delete_namespaced_custom_objects(
expected_custom_object_namespace,
crd_plural,
expected_custom_object_name,
client.V1DeleteOptions(),
)
for expected_custom_object_name in expected_custom_object_names
]
Expand Down

0 comments on commit 92e5c84

Please sign in to comment.