Support for k8s ingress and tls (#659)

This commit was merged in pull request #659.
This commit is contained in:
2023-11-21 16:04:36 -07:00
committed by GitHub
parent 01029cf7aa
commit 87bedde5cb
5 changed files with 172 additions and 23 deletions
@@ -103,8 +103,8 @@ def _fixup_pod_file(pod, spec, compose_dir):
}
pod["volumes"][volume] = new_volume_spec
# Fix up ports
if "ports" in spec:
spec_ports = spec["ports"]
if "network" in spec and "ports" in spec["network"]:
spec_ports = spec["network"]["ports"]
for container_name, container_ports in spec_ports.items():
if container_name in pod["services"]:
pod["services"][container_name]["ports"] = container_ports
@@ -285,7 +285,7 @@ def init(ctx, config, kube_config, image_registry, output, map_ports_to_host):
print(f"Creating spec file for stack: {stack} with content: {spec_file_content}")
ports = _get_mapped_ports(stack, map_ports_to_host)
spec_file_content["ports"] = ports
spec_file_content.update({"network": {"ports": ports}})
named_volumes = _get_named_volumes(stack)
if named_volumes: