From 276134cdf9524656a7a466d5a362a468d235368b Mon Sep 17 00:00:00 2001 From: Mani Marothu Date: Mon, 16 Sep 2024 16:24:06 -0700 Subject: [PATCH] Updated path to query based on component annotation Signed-off-by: Mani Marothu --- plugins/argo-workflows/src/api/ArgoWorkflows.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/argo-workflows/src/api/ArgoWorkflows.ts b/plugins/argo-workflows/src/api/ArgoWorkflows.ts index deb8961..5305dcd 100644 --- a/plugins/argo-workflows/src/api/ArgoWorkflows.ts +++ b/plugins/argo-workflows/src/api/ArgoWorkflows.ts @@ -33,8 +33,10 @@ export class ArgoWorkflows implements ArgoWorkflowsApi { namespace: string, labels: string | undefined ): Promise { - const ns = namespace !== undefined ? namespace : "default"; - const path = `/apis/${API_VERSION}/namespaces/${ns}/${WORKFLOW_PLURAL}`; + let path = `/apis/${API_VERSION}/${WORKFLOW_PLURAL}`; + if(namespace !== undefined){ + path = `/apis/${API_VERSION}/namespaces/${namespace}/${WORKFLOW_PLURAL}`; + } const query = new URLSearchParams({ [K8s_API_TIMEOUT]: "30", });