Skip to content

Commit 9c61fb6

Browse files
committed
document new sni logic/limitations
Signed-off-by: Travis Glenn Hansen <[email protected]>
1 parent 587bc61 commit 9c61fb6

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# v0.5.6
2+
3+
Released 2021-09-04
4+
5+
- support for sni based routing in `haproxy-ingress-proxy` when type is `https`
6+
- handle more stringent type checks by php 8
7+
18
# v0.5.5
29

310
Released 2021-08-01

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ To achieve this goal, new 'shared' HAProxy frontends are created and attached to
105105
created frontend should also set an existing backend. Note that existing frontend(s)/backend(s) can be created manually
106106
or using the `haproxy-declarative` plugin.
107107

108+
When creating the parent frontend(s) please note that the selected type should be `http / https(offloading` to fully
109+
support the feature. If type `ssl / https(TCP mode)` is selected (`SSL Offloading` may be selected or not in the
110+
`External address` table) `sni` is used for routing logic and **CANNOT** support path-based logic which implies a 1:1
111+
mapping between `host` entries and backing `service`s. Type `tcp` will not work and any `Ingress` resources that would
112+
be bound to a frontend of this type are ignored.
113+
108114
Combined with `haproxy-declarative` you can create a dynamic backend service (ie: your ingress controller) and
109115
subsequently dynamic frontend services based off of cluster ingresses. This is generally helpful when you cannot or do
110116
not for whatever reason create wildcard frontend(s) to handle incoming traffic in HAProxy on pfSense.

src/KubernetesPfSenseController/Plugin/HAProxyIngressProxy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function doAction()
198198
// move along
199199
break;
200200
default:
201-
$this->log("WARN ${sharedFrontendName} is not a supported type");
201+
$this->log("WARN haproxy frontend ${sharedFrontendName} has unsupported type: ".$sharedFrontend['type']);
202202
continue 2;
203203
}
204204

@@ -262,13 +262,13 @@ public function doAction()
262262
$frontend['ha_acls']['item'][] = $acl;
263263
break;
264264
case "https":
265-
$this->log("WARN unexpected behavior may occur when using a shared frontend of type https, path-based routing will not work and ssl offloading must be enabled");
265+
$this->log("WARN unexpected behavior may occur when using a shared frontend of type https, path-based routing will not work");
266266
$acl['value'] = "req_ssl_sni -i ${host}";
267267
$frontend['ha_acls']['item'][] = $acl;
268268
break;
269269
default:
270270
// should never get here based on checks above, but just in case
271-
$this->log("WARN unsupported shared frontend type: ".$sharedFrontend['type']);
271+
$this->log("WARN haproxy frontend ${sharedFrontendName} has unsupported type: ".$sharedFrontend['type']);
272272
continue 3;
273273
break;
274274
}

0 commit comments

Comments
 (0)