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 )