Skip to content

Commit 78357cf

Browse files
committed
OSDOCS-4140: Ported routes to OSD/ROSA
1 parent 34c785a commit 78357cf

File tree

7 files changed

+51
-8
lines changed

7 files changed

+51
-8
lines changed

_topic_maps/_topic_map_osd.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ Topics:
222222
File: deleting-network-policy
223223
- Name: Configuring multitenant isolation with network policy
224224
File: multitenant-network-policy
225+
- Name: Configuring Routes
226+
Dir: routes
227+
Topics:
228+
- Name: Route configuration
229+
File: route-configuration
230+
- Name: Secured routes
231+
File: secured-routes
225232
---
226233
Name: Applications
227234
Dir: applications

_topic_maps/_topic_map_rosa.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,13 @@ Topics:
326326
File: deleting-network-policy
327327
- Name: Configuring multitenant isolation with network policy
328328
File: multitenant-network-policy
329+
- Name: Configuring Routes
330+
Dir: routes
331+
Topics:
332+
- Name: Route configuration
333+
File: route-configuration
334+
- Name: Secured routes
335+
File: secured-routes
329336
---
330337
Name: Application development
331338
Dir: applications

modules/nw-creating-a-route.adoc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,18 @@ $ oc expose pod/hello-openshift
4747
----
4848
$ oc expose svc hello-openshift
4949
----
50+
51+
.Verification
52+
53+
* To verify that the `route` resource that you created, run the following command:
5054
+
51-
If you examine the resulting `Route` resource, it should look similar to the following:
52-
+
53-
.YAML definition of the created unsecured route:
55+
[source,terminal]
56+
----
57+
$ oc get routes -o yaml <name of resource> <1>
58+
----
59+
<1> In this example, the route is named `hello-openshift`.
60+
61+
.Sample YAML definition of the created unsecured route:
5462
[source,yaml]
5563
----
5664
apiVersion: route.openshift.io/v1

modules/nw-disabling-hsts.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ metadata:
3434
----
3535
====
3636
37-
* To disable HSTS for every route in a namespace, enter the followinf command:
37+
* To disable HSTS for every route in a namespace, enter the following command:
3838
+
3939
[source,terminal]
4040
----
41-
$ oc annotate <route> --all -n <namespace> --overwrite=true "haproxy.router.openshift.io/hsts_header"="max-age=0"
41+
$ oc annotate route --all -n <namespace> --overwrite=true "haproxy.router.openshift.io/hsts_header"="max-age=0"
4242
----
4343
4444
.Verification

modules/nw-enabling-hsts-per-route.adoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,19 @@ HTTP strict transport security (HSTS) is implemented in the HAProxy template and
1414
1515
.Procedure
1616

17-
* To enable HSTS on a route, add the `haproxy.router.openshift.io/hsts_header` value to the edge-terminated or re-encrypt route:
17+
* To enable HSTS on a route, add the `haproxy.router.openshift.io/hsts_header` value to the edge-terminated or re-encrypt route. You can use the `oc annotate` tool to do this by running the following command:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc annotate route <rout_name> -n <namespace> --overwrite=true "haproxy.router.openshift.io/hsts_header"="max-age=31536000;\ <1>
22+
includeSubDomains;preload"
23+
----
24+
<1> In this example, the maximum age is set to `31536000` ms, which is approximately eight and a half hours.
25+
+
26+
[NOTE]
27+
====
28+
In this example, the equal sign (`=`) is in quotes. This is required to properly execute the annotate command.
29+
====
1830
+
1931
.Example route configured with an annotation
2032
[source,yaml]

networking/routes/route-configuration.adoc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
[id="route-configuration"]
55
= Route configuration
66
include::_attributes/common-attributes.adoc[]
7+
include::_attributes/attributes-openshift-dedicated.adoc[]
78
:context: route-configuration
89

910
toc::[]
1011

11-
1212
//Creating an insecure route
1313
include::modules/nw-creating-a-route.adoc[leveloffset=+1]
1414

15+
ifndef::openshift-rosa,openshift-dedicated[]
1516
// Creating a route for router sharding
1617
include::modules/nw-ingress-sharding-route-configuration.adoc[leveloffset=+1]
18+
endif::[]
1719

1820
//Creating route timeouts
1921
include::modules/nw-configuring-route-timeouts.adoc[leveloffset=+1]
@@ -27,6 +29,7 @@ include::modules/nw-enabling-hsts-per-route.adoc[leveloffset=+2]
2729
//Disabling HTTP strict transport security per-route
2830
include::modules/nw-disabling-hsts.adoc[leveloffset=+2]
2931

32+
ifndef::openshift-rosa,openshift-dedicated[]
3033
//Enforcing HTTP strict transport security per-domain
3134
include::modules/nw-enforcing-hsts-per-domain.adoc[leveloffset=+2]
3235

@@ -38,7 +41,10 @@ include::modules/nw-throughput-troubleshoot.adoc[leveloffset=+1]
3841

3942
* xref:../../nodes/edge/nodes-edge-remote-workers.adoc#nodes-edge-remote-workers-latency[Latency spikes or temporary reduction in throughput to remote workers]
4043
41-
* xref:../../networking/ingress-operator.adoc#nw-ingress-controller-configuration-parameters_configuring-ingress[Ingress Controller configuration parameters]
44+
45+
* xref:../../networking/ingress-operator.adoc#nw-ingress-controller-configuration-parameters_configuring-ingress[Ingress Controller configuration
46+
parameters]
47+
endif::[]
4248
4349
//Using cookies to keep route statefulness
4450
include::modules/nw-using-cookies-keep-route-statefulness.adoc[leveloffset=+1]
@@ -49,9 +55,11 @@ include::modules/nw-path-based-routes.adoc[leveloffset=+1]
4955

5056
include::modules/nw-route-specific-annotations.adoc[leveloffset=+1]
5157

58+
ifndef::openshift-rosa,openshift-dedicated[]
5259
include::modules/nw-route-admission-policy.adoc[leveloffset=+1]
5360

5461
include::modules/nw-ingress-creating-a-route-via-an-ingress.adoc[leveloffset=+1]
62+
endif::[]
5563

5664
include::modules/nw-ingress-reencrypt-route-custom-cert.adoc[leveloffset=+1]
5765

networking/routes/secured-routes.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[id="configuring-default-certificate"]
33
= Secured routes
44
include::_attributes/common-attributes.adoc[]
5+
include::_attributes/attributes-openshift-dedicated.adoc[]
56
:context: secured-routes
67

78
toc::[]

0 commit comments

Comments
 (0)