Skip to content

Commit a92bc5e

Browse files
authored
Merge pull request #33161 from ahardin-rh/customize-console-routes
OSDOCS-1864:Customizing console route updates
2 parents abdc19b + 4f62c69 commit a92bc5e

File tree

1 file changed

+39
-46
lines changed

1 file changed

+39
-46
lines changed

modules/customizing-the-web-console-URL.adoc

Lines changed: 39 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,67 +3,60 @@
33
// * web_console/customizing-the-web-console.adoc
44

55
[id="customizing-the-web-console-url_{context}"]
6-
= Customizing the web console URL
6+
= Customizing console routes
77

8-
You can update the web console URL, `consoleURL`, to a custom value.
8+
For `console` and `downloads` routes, custom routes functionality uses the `ingress` config route configuration API. If the `console` custom route is set up in both the `ingress` config and `console-operator` config, then the new `ingress` config custom route configuration takes precedent. The route configuration with the `console-operator` config is deprecated.
9+
10+
[id="customizing-the-console-route_{context}"]
11+
== Customizing the console route
12+
13+
.Prerequisites
14+
15+
* Log in to the cluster as a user with administrative privileges.
916

1017
.Procedure
1118

12-
. Modify the cluster instance created by default during installation in the `consoles.operator.openshift.io` custom resource:
13-
+
14-
[source,terminal]
15-
----
16-
$ oc patch consoles.operator.openshift.io cluster --patch '{"spec":{"route":{"hostname":"console.example.com"}}}' --type=merge
17-
----
19+
* Set the custom hostname and, if needed, set TLS on the ingress config's spec:
1820
+
1921
[source,yaml]
2022
----
21-
apiVersion: operator.openshift.io/v1
22-
kind: Console
23+
apiVersion: config.openshift.io/v1
24+
kind: Ingress
2325
metadata:
2426
name: cluster
2527
spec:
26-
route:
27-
hostname: 'console.example.com'
28+
componentRoutes:
29+
- name: console
30+
namespace: openshift-console
31+
hostname: <custom-hostname>
32+
secret:
33+
name: <secret-name>
2834
----
29-
. If you specify a custom certificate, you must create a secret in the `openshift-config` namespace that has the key and certificate. For example:
3035
+
31-
[source,terminal]
32-
----
33-
$ oc create secret tls console-tls --key=key.pem --cert=cert.pem -n openshift-config
34-
----
36+
If the domain for the custom hostname suffix does not match the cluster domain suffix, then a secret that contains a TLS certificate and key must exist in the `openshift-config` namespace and must be referenced in the `ingress` config. If the domain for the custom hostname suffix matches the cluster domain suffix, then the secret is optional. The secret must contain `tls.crt` and `tls.key` data keys, where the certificate and key are stored, and both must be in a valid format.
37+
38+
[id="customizing-the-download-route_{context}"]
39+
== Customizing the download route
40+
41+
.Prerequisites
42+
43+
* Log in to the cluster as a user with administrative privileges.
44+
45+
.Procedure
46+
47+
* Set the custom hostname and, if needed, set TLS on the ingress config's spec:
3548
+
3649
[source,yaml]
3750
----
38-
apiVersion: v1
39-
kind: Secret
51+
apiVersion: config.openshift.io/v1
52+
kind: Ingress
4053
metadata:
41-
name: console-tls
42-
namespace: openshift-config
43-
type: kubernetes.io/tls
44-
data:
45-
tls.crt: >-
46-
<base64-encoded_cert> ... <1>
47-
tls.key: >-
48-
<base64-encoded_key> ... <2>
49-
----
50-
<1> Provide a valid TLS certificate.
51-
<2> Provide a valid TLS key.
52-
+
53-
Then, edit the web console’s Operator configuration:
54-
+
55-
[source,terminal]
56-
----
57-
$ oc edit consoles.operator.openshift.io cluster
58-
----
59-
+
60-
Add the following stanza to the configuration resource:
61-
+
62-
[source,yaml]
63-
----
54+
name: cluster
6455
spec:
65-
route:
66-
hostname: console.example.com
67-
secret:
68-
name: console-tls
56+
componentRoutes:
57+
- name: downloads
58+
namespace: openshift-console
59+
hostname: <custom-hostname>
60+
secret:
61+
name: <secret-name>
6962
----

0 commit comments

Comments
 (0)