Auto-detect which certificate to use (including wildcards). #779

Merged
telackey merged 9 commits from telackey/wild2 into main 2024-03-07 17:38:38 +00:00
Showing only changes of commit 3296dd0ae6 - Show all commits

View File

@ -112,16 +112,10 @@ class ClusterInfo:
print(f"http-proxy: {http_proxy_info}")
# TODO: good enough parsing for webapp deployment for now
host_name = http_proxy_info["host-name"]
tls_hosts = [host_name],
tls_secret_name = f"{self.app_name}-tls"
if certificate:
tls_hosts = certificate["spec"]["dnsNames"]
tls_secret_name = certificate["spec"]["secretName"]
rules = []
tls = [client.V1IngressTLS(
hosts=tls_hosts,
secret_name=tls_secret_name
hosts=certificate["spec"]["dnsNames"] if certificate else [host_name],
secret_name=certificate["spec"]["secretName"] if certificate else f"{self.app_name}-tls"
)] if use_tls else None
paths = []
for route in http_proxy_info["routes"]: