From 768d5ef64fe01a0d4cebf9dcad701c5acecc681e Mon Sep 17 00:00:00 2001 From: Marek Skrobacki Date: Tue, 24 Sep 2024 22:30:30 +0100 Subject: [PATCH] argo_python: revert change of owner_name lookup The owner_name variable refers to a pod name, so that Secret can be automatically cleaned up by kubernetes when the Pod is removed. --- containers/argo_utils/code/argo_python/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/argo_utils/code/argo_python/__init__.py b/containers/argo_utils/code/argo_python/__init__.py index ec613af6..a460652e 100644 --- a/containers/argo_utils/code/argo_python/__init__.py +++ b/containers/argo_utils/code/argo_python/__init__.py @@ -45,7 +45,7 @@ def create_secret(self, name: str, data: Dict, persist=False) -> str: try: # if KUBERNETES_POD_UID is not explicitly defined in the container env, pod get permissions will need # be set for the service account running this workflow - owner_name = os.environ["DEVICE_ID"] + owner_name = os.environ["HOSTNAME"] owner_id = os.getenv("KUBERNETES_POD_UID") if not owner_id: owner_metadata = self.get_pod(owner_name)