From 9b6779515e6ce5b66392d5bed5d17da7dcb6bb22 Mon Sep 17 00:00:00 2001 From: Prabhat Khera <91852476+prabhat-portainer@users.noreply.github.com> Date: Fri, 3 May 2024 09:12:37 +1200 Subject: [PATCH] fix(kubernetes): namespace yaml [EE-6701] (#11747) --- .../views/resource-pools/edit/resourcePoolController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js index 7f2ccc1ed..e153c60a7 100644 --- a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js +++ b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js @@ -345,7 +345,7 @@ class KubernetesResourcePoolController { const name = this.$state.params.id; - const [nodes, pools] = await Promise.all([this.KubernetesNodeService.get(), this.KubernetesResourcePoolService.get('', { getQuota: true })]); + const [nodes, pool] = await Promise.all([this.KubernetesNodeService.get(), this.KubernetesResourcePoolService.get(name)]); this.ingressControllers = []; if (this.state.ingressAvailabilityPerNamespace) { @@ -353,7 +353,7 @@ class KubernetesResourcePoolController { this.initialIngressControllers = structuredClone(this.ingressControllers); } - this.pool = _.find(pools, { Namespace: { Name: name } }); + this.pool = pool; this.formValues = new KubernetesResourcePoolFormValues(KubernetesResourceQuotaDefaults); this.formValues.Name = this.pool.Namespace.Name; this.formValues.EndpointId = this.endpoint.Id;