Auto-detect which certificate to use (including wildcards). #779
@ -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"]:
|
||||
|
Loading…
Reference in New Issue
Block a user