Fix stop command

This commit is contained in:
David Boreham 2023-11-21 13:28:05 -07:00
parent 4e9151318a
commit ee3d3364ba
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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
)