From ee3d3364ba61478918fafd9d691d832edec0fad2 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 21 Nov 2023 13:28:05 -0700 Subject: [PATCH] Fix stop command --- stack_orchestrator/deploy/k8s/cluster_info.py | 6 ++++-- stack_orchestrator/deploy/k8s/deploy_k8s.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stack_orchestrator/deploy/k8s/cluster_info.py b/stack_orchestrator/deploy/k8s/cluster_info.py index f8c2ce94..0bfe37bf 100644 --- a/stack_orchestrator/deploy/k8s/cluster_info.py +++ b/stack_orchestrator/deploy/k8s/cluster_info.py @@ -48,9 +48,11 @@ class ClusterInfo: def get_ingress(self): # No ingress for a deployment that has no http-proxy defined, for now - http_proxy_info = self.spec.get_http_proxy() + http_proxy_info_list = self.spec.get_http_proxy() ingress = None - if http_proxy_info: + if http_proxy_info_list: + # TODO: handle multiple definitions + http_proxy_info = http_proxy_info_list[0] if opts.o.debug: print(f"http-proxy: {http_proxy_info}") # TODO: good enough parsing for webapp deployment for now diff --git a/stack_orchestrator/deploy/k8s/deploy_k8s.py b/stack_orchestrator/deploy/k8s/deploy_k8s.py index 2e1f6e90..a5fa0bcb 100644 --- a/stack_orchestrator/deploy/k8s/deploy_k8s.py +++ b/stack_orchestrator/deploy/k8s/deploy_k8s.py @@ -149,7 +149,7 @@ class K8sDeployer(Deployer): ingress: client.V1Ingress = self.cluster_info.get_ingress() if opts.o.debug: print(f"Deleting this ingress: {ingress}") - self.apps_api.delete_namespaced_ingress( + self.networking_api.delete_namespaced_ingress( name=ingress.metadata.name, namespace=self.k8s_namespace )