providers/proxy: set traefik labels using object_naming_template instead of UUID
This commit is contained in:
parent
0232c4e162
commit
88603fa4f7
|
@ -23,7 +23,7 @@ class ProxyDockerController(DockerController):
|
||||||
proxy_provider: ProxyProvider
|
proxy_provider: ProxyProvider
|
||||||
external_host_name = urlparse(proxy_provider.external_host)
|
external_host_name = urlparse(proxy_provider.external_host)
|
||||||
hosts.append(f"`{external_host_name.netloc}`")
|
hosts.append(f"`{external_host_name.netloc}`")
|
||||||
traefik_name = f"ak-outpost-{self.outpost.pk.hex}"
|
traefik_name = self.name
|
||||||
labels = super()._get_labels()
|
labels = super()._get_labels()
|
||||||
labels["traefik.enable"] = "true"
|
labels["traefik.enable"] = "true"
|
||||||
labels[
|
labels[
|
||||||
|
|
|
@ -23,12 +23,12 @@ The container is created with the following hardcoded properties:
|
||||||
Additionally, the proxy outposts have the following extra labels to add themselves into traefik automatically.
|
Additionally, the proxy outposts have the following extra labels to add themselves into traefik automatically.
|
||||||
|
|
||||||
- `traefik.enable`: "true"
|
- `traefik.enable`: "true"
|
||||||
- `traefik.http.routers.ak-outpost-<outpost-id>-router.rule`: `Host(...)`
|
- `traefik.http.routers.ak-outpost-<outpost-name>-router.rule`: `Host(...)`
|
||||||
- `traefik.http.routers.ak-outpost-<outpost-id>-router.service`: `ak-outpost-<outpost-id>-service`
|
- `traefik.http.routers.ak-outpost-<outpost-name>-router.service`: `ak-outpost-<outpost-name>-service`
|
||||||
- `traefik.http.routers.ak-outpost-<outpost-id>-router.tls`: "true"
|
- `traefik.http.routers.ak-outpost-<outpost-name>-router.tls`: "true"
|
||||||
- `traefik.http.services.ak-outpost-<outpost-id>-service.loadbalancer.healthcheck.path`: "/akprox/ping"
|
- `traefik.http.services.ak-outpost-<outpost-name>-service.loadbalancer.healthcheck.path`: "/akprox/ping"
|
||||||
- `traefik.http.services.ak-outpost-<outpost-id>-service.loadbalancer.healthcheck.port`: "9300"
|
- `traefik.http.services.ak-outpost-<outpost-name>-service.loadbalancer.healthcheck.port`: "9300"
|
||||||
- `traefik.http.services.ak-outpost-<outpost-id>-service.loadbalancer.server.port`: "9000"
|
- `traefik.http.services.ak-outpost-<outpost-name>-service.loadbalancer.server.port`: "9000"
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
|
|
||||||
|
|
Reference in New Issue