Skip to content

Commit cffbd81

Browse files
committed
:ODDOCS-2113:Added topic about configuring PROXY protocol on Ingress Controllers
:ODDOCS-2113:Added topic about configuring PROXY protocol on Ingress Controllers
1 parent cfadbcb commit cffbd81

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * ingress/configure-ingress-operator.adoc
4+
5+
[id="nw-ingress-controller-configuration-proxy-protocol_{context}"]
6+
= Configuring the PROXY protocol for an Ingress Controller
7+
8+
A cluster administrator can configure https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt[the PROXY protocol] when an Ingress Controller uses either the `HostNetwork` or `NodePortService` endpoint publishing strategy types. The PROXY protocol enables the load balancer to preserve the original client addresses for connections that the Ingress Controller receives. The original client addresses are useful for logging, filtering, and injecting HTTP headers. In the default configuration, the connections that the Ingress Controller receives only contain the source address that is associated with the load balancer.
9+
10+
This feature is not supported in cloud deployments. This restriction is because when {product-title} runs in a cloud platform, and an IngressController specifies that a service load balancer should be used, the Ingress Operator configures the load balancer service and enables the PROXY protocol based on the platform requirement for preserving source addresses.
11+
12+
[WARNING]
13+
====
14+
To prevent connection failure, configure both the Ingress Controller and the load balancer to use the PROXY protocol.
15+
====
16+
17+
.Prerequisites
18+
* You created an Ingress Controller.
19+
20+
.Procedure
21+
. Edit the Ingress Controller resource:
22+
+
23+
[source,terminal]
24+
----
25+
$ oc -n openshift-ingress-operator edit ingresscontroller/default
26+
----
27+
28+
. Set the PROXY configuration:
29+
+
30+
* If your Ingress Controller uses the hostNetwork endpoint publishing strategy type, set the `spec.endpointPublishingStrategy.hostNetwork.protocol` subfield to `PROXY`:
31+
+
32+
.Sample `hostNetwork` configuration to `PROXY`
33+
[source,yaml]
34+
----
35+
spec:
36+
endpointPublishingStrategy:
37+
hostNetwork:
38+
protocol: PROXY
39+
type: NodePortService
40+
----
41+
* If your Ingress Controller uses the NodePortService endpoint publishing strategy type, set the `spec.endpointPublishingStrategy.nodePort.protocol` subfield to `PROXY`:
42+
+
43+
.Sample `nodePort` configuration to `PROXY`
44+
[source,yaml]
45+
----
46+
spec:
47+
endpointPublishingStrategy:
48+
nodePort:
49+
protocol: PROXY
50+
type: NodePortService
51+
----

networking/ingress-operator.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ include::modules/nw-using-ingress-forwarded.adoc[leveloffset=+2]
6060

6161
include::modules/nw-http2-haproxy.adoc[leveloffset=+2]
6262

63+
include::modules/nw-ingress-controller-configuration-proxy-protocol.adoc[leveloffset=+2]
64+
6365
include::modules/nw-ingress-configuring-application-domain.adoc[leveloffset=+2]
6466

6567
include::modules/nw-ingress-converting-http-header-case.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)