Skip to content

Commit

Permalink
Fix Traefik configuration to allow for non TLS connections (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturo-seijas authored Dec 4, 2024
1 parent 6cb14c6 commit d56b1a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/traefik_route_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ def _ingress_config(self) -> dict[str, dict[str, dict[str, typing.Any]]]:
routers[f"juju-{self.model.name}-{self.model.app.name}-{sanitized_protocol}"] = {
"entryPoints": [sanitized_protocol],
"service": service_name,
"rule": "HostSNI(`*`)",
"tls": {"passthrough": True},
"rule": "ClientIP(`0.0.0.0/0`)",
}
services[service_name] = {
"loadBalancer": {
Expand Down
6 changes: 2 additions & 4 deletions tests/unit/test_traefik_route_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ def test_on_traefik_route_relation_joined_when_leader(monkeypatch: pytest.Monkey
"juju-testing-observer-charm-conn-tcp": {
"entryPoints": ["conn-tcp"],
"service": "juju-testing-observer-charm-service-conn-tcp",
"rule": "HostSNI(`*`)",
"tls": {"passthrough": True},
"rule": "ClientIP(`0.0.0.0/0`)",
},
"juju-testing-observer-charm-enrole-tcp": {
"entryPoints": ["enrole-tcp"],
"service": "juju-testing-observer-charm-service-enrole-tcp",
"rule": "HostSNI(`*`)",
"tls": {"passthrough": True},
"rule": "ClientIP(`0.0.0.0/0`)",
},
},
"services": {
Expand Down

0 comments on commit d56b1a5

Please sign in to comment.