add tls_passthrough option for traefik router
This commit is contained in:
parent
070ca1cf71
commit
d9b85bdd77
3 changed files with 23 additions and 1 deletions
|
@ -2,7 +2,7 @@ namespace: snailed
|
|||
|
||||
name: ez_docker
|
||||
|
||||
version: 3.1.0
|
||||
version: 3.2.0
|
||||
|
||||
readme: README.md
|
||||
|
||||
|
|
|
@ -38,6 +38,11 @@ traefik_router:
|
|||
description:
|
||||
- Certresolver to use.
|
||||
type: str
|
||||
tls_passthrough:
|
||||
description:
|
||||
- Enable TLS passthrough.
|
||||
type: bool
|
||||
default: false
|
||||
entrypoints:
|
||||
description:
|
||||
- Entrypoints to listen on.
|
||||
|
@ -56,6 +61,7 @@ EXTRA_ARGS = {
|
|||
"proxy_type": {"type": "str", "default": "http"},
|
||||
"service": {"type": "str"},
|
||||
"certresolver": {"type": "str"},
|
||||
"tls_passthrough": {"type": "bool", "default": False},
|
||||
"entrypoints": {"type": "list"},
|
||||
"middlewares": {"type": "list"},
|
||||
}
|
||||
|
@ -68,6 +74,7 @@ def helper(state: State, service_name: str, params: dict[str, Any]) -> dict[str,
|
|||
entrypoints: list[str] | None = params.get("entrypoints")
|
||||
middlewares: list[str] | None = params.get("middlewares")
|
||||
certresolver: str | None = params.get("certresolver")
|
||||
tls_passthrough: bool = params["tls_passthrough"]
|
||||
proxy_type: str = params["proxy_type"]
|
||||
name: str = params.get("name", f"{project_name}_{service_name}_{proxy_type}")
|
||||
|
||||
|
@ -81,6 +88,9 @@ def helper(state: State, service_name: str, params: dict[str, Any]) -> dict[str,
|
|||
if certresolver:
|
||||
labels[f"{prefix}.tls.certresolver"] = certresolver
|
||||
|
||||
if tls_passthrough:
|
||||
labels[f"{prefix}.tls.passthrough"] = "true"
|
||||
|
||||
if entrypoints:
|
||||
labels[f"{prefix}.entrypoints"] = ",".join(entrypoints)
|
||||
|
||||
|
|
|
@ -199,6 +199,10 @@ options:
|
|||
description:
|
||||
- Certresolver to use.
|
||||
type: str
|
||||
tls_passthrough:
|
||||
description:
|
||||
- Enable TLS passthrough.
|
||||
type: bool
|
||||
entrypoints:
|
||||
description:
|
||||
- Entrypoints to listen on.
|
||||
|
@ -466,6 +470,10 @@ options:
|
|||
description:
|
||||
- Certresolver to use.
|
||||
type: str
|
||||
tls_passthrough:
|
||||
description:
|
||||
- Enable TLS passthrough.
|
||||
type: bool
|
||||
entrypoints:
|
||||
description:
|
||||
- Entrypoints to listen on.
|
||||
|
@ -617,6 +625,10 @@ options:
|
|||
description:
|
||||
- Certresolver to use.
|
||||
type: str
|
||||
tls_passthrough:
|
||||
description:
|
||||
- Enable TLS passthrough.
|
||||
type: bool
|
||||
entrypoints:
|
||||
description:
|
||||
- Entrypoints to listen on.
|
||||
|
|
Loading…
Add table
Reference in a new issue