Skip to content

Commit 7650ad0

Browse files
author
brice
committed
added info for routes to accept ingress objects
1 parent deffd0d commit 7650ad0

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

admin_guide/managing_networking.adoc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,40 @@ $ systemctl restart atomic-openshift-master-api atomic-openshift-master-controll
144144
145145
----
146146

147+
[[admin-guide-managing-networking-ingress]]
148+
== Setting up the HAProxy router to accept ingress objects
149+
150+
By default, the HAProxy router only accepts route objects. You can set up the
151+
HAProxy router as a Kubernetes
152+
link:https://kubernetes.io/docs/concepts/services-networking/ingress/[Ingress
153+
Controller] so that it accepts both route and ingress objects. If configured,
154+
the same rules apply for claiming a domain for a namespace based on the creation
155+
time of the object. For example, the oldest route winning against any other
156+
claimants wanting to use the same namespace.
157+
158+
For example, ownership of routes is based on the claims made for that host name with the same namespace. The oldest route wins against any other claims.
159+
160+
While this makes the router compatible with Kubernetes ingress
161+
objects, some caveats exist:
162+
163+
* Ingress objects store the keys and certificates in secrets, so the router needs permission to read all secrets in the system.
164+
* Ingress objects only support edge termination for *https* routes.
165+
166+
To configure an existing router to have Ingress support (assuming the default
167+
name of `router` for the deployment configuration and the service-account):
168+
169+
. Set the `ROUTER_ENABLE_INGRESS` environment variable to `true`:
170+
+
171+
----
172+
$ oc env dc router ROUTER_ENABLE_INGRESS=true`
173+
----
174+
175+
. Add the cluster-admin role to the router:
176+
+
177+
----
178+
$ oc adm policy add-role-to-user cluster-admin router`
179+
----
180+
147181
[[admin-guide-controlling-egress-traffic]]
148182
== Controlling Egress Traffic
149183

architecture/topics/router_environment_variables.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ connections (and any time HAProxy is reloaded), the old HAProxy processes
4545
will "linger" around for that period. xref:time-units[(TimeUnits)]
4646
|`ROUTER_DENIED_DOMAINS` | | A comma-separated list of domains that the host name in a route can not be part of. No subdomain in the domain can be used either. Overrides option `ROUTER_ALLOWED_DOMAINS`.
4747
|`ROUTER_ENABLE_COMPRESSION`| | If `true` or `TRUE`, compress responses when possible.
48+
|`ROUTER_ENABLE_INGRESS`| | If `true` or `TRUE`, look at both Ingress objects and Route objects.
4849
|`ROUTER_LISTEN_ADDR`| 0.0.0.0:1936 | Sets the listening address for xref:../../install_config/router/default_haproxy_router.adoc#exposing-the-router-metrics[router metrics].
4950
|`ROUTER_LOG_LEVEL` | warning | The log level to send to the syslog server.
5051
|`ROUTER_MAX_CONNECTIONS`| 20000 | Maximum number of concurrent connections.

0 commit comments

Comments
 (0)