diff --git a/scripts/portforward.py b/scripts/portforward.py index afca259..bf2d993 100755 --- a/scripts/portforward.py +++ b/scripts/portforward.py @@ -113,6 +113,32 @@ def create_portforwards(): print("✅ Kubeconfig подготовлен") + # Ingress HTTP (80) + if addon_ports.get('ingress_http'): + port = addon_ports['ingress_http'] + print(f" - Ingress HTTP: localhost:{port} -> ingress-nginx-controller:80") + subprocess.Popen([ + "kubectl", + f"--kubeconfig={kubeconfig_file}", + "port-forward", + "-n", "ingress-nginx", + "svc/ingress-nginx-controller", + f"{port}:80" + ], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + # Ingress HTTPS (443) + if addon_ports.get('ingress_https'): + port = addon_ports['ingress_https'] + print(f" - Ingress HTTPS: localhost:{port} -> ingress-nginx-controller:443") + subprocess.Popen([ + "kubectl", + f"--kubeconfig={kubeconfig_file}", + "port-forward", + "-n", "ingress-nginx", + "svc/ingress-nginx-controller", + f"{port}:443" + ], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + # Prometheus if addon_ports.get('prometheus'): port = addon_ports['prometheus']