From 65b4569f4d2b8a120ad5b79b17e4a446a9f6178b Mon Sep 17 00:00:00 2001 From: Harry Park Date: Mon, 13 Nov 2023 12:57:40 +0900 Subject: [PATCH] Support resource deletion with LIST(SLEEP) --- src/resources.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/resources.py b/src/resources.py index b3dfe426..8cdf0524 100755 --- a/src/resources.py +++ b/src/resources.py @@ -147,10 +147,13 @@ def list_resources(label, label_value, target_folder, request_url, request_metho logger.debug(f"Removing {resource}: {metadata.namespace}/{metadata.name}") + # Get the destination folder + dest_folder = _get_destination_folder(metadata, target_folder, folder_annotation) + if resource == RESOURCE_CONFIGMAP: - files_changed |= _process_config_map(None, item, resource, unique_filenames, enable_5xx, True) + files_changed |= _process_config_map(dest_folder, item, resource, unique_filenames, enable_5xx, True) else: - files_changed = _process_secret(None, item, resource, unique_filenames, enable_5xx, True) + files_changed = _process_secret(dest_folder, item, resource, unique_filenames, enable_5xx, True) if script and files_changed: execute(script)