From 0eab43577dc7fd87d529984bc9d2c03b365db915 Mon Sep 17 00:00:00 2001 From: Akhilesh Halageri Date: Mon, 17 Feb 2025 21:46:07 +0000 Subject: [PATCH] fix(keda): trim job name (k8s/dns 63 limit) --- zetta_utils/cloud_management/resource_allocation/k8s/keda.py | 2 +- .../cloud_management/resource_allocation/k8s/keda_deprecated.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zetta_utils/cloud_management/resource_allocation/k8s/keda.py b/zetta_utils/cloud_management/resource_allocation/k8s/keda.py index 3b054e818..bbada7fb2 100644 --- a/zetta_utils/cloud_management/resource_allocation/k8s/keda.py +++ b/zetta_utils/cloud_management/resource_allocation/k8s/keda.py @@ -116,7 +116,7 @@ def _get_scaled_job_manifest( Create manifest for Keda ScaledObject. """ api = ApiClient() - name = f"run-{run_id}-scaledjob" + name = f"run-{run_id}-sj" manifest = { "apiVersion": KEDA_API_VERSION, "kind": ResourceTypes.K8S_SCALED_JOB.value, diff --git a/zetta_utils/cloud_management/resource_allocation/k8s/keda_deprecated.py b/zetta_utils/cloud_management/resource_allocation/k8s/keda_deprecated.py index 2418eda71..e1722e41c 100644 --- a/zetta_utils/cloud_management/resource_allocation/k8s/keda_deprecated.py +++ b/zetta_utils/cloud_management/resource_allocation/k8s/keda_deprecated.py @@ -117,7 +117,7 @@ def _get_scaled_job_manifest( Create manifest for Keda ScaledObject. """ api = ApiClient() - name = f"run-{run_id}-scaledjob" + name = f"run-{run_id}-sj" manifest = { "apiVersion": KEDA_API_VERSION, "kind": ResourceTypes.K8S_SCALED_JOB.value,