Skip to content
This repository was archived by the owner on Aug 1, 2019. It is now read-only.

Commit 9fcba85

Browse files
nebelsprachenabrennan89
authored andcommitted
SRVKS-22: Post-installation tasks OCP4 (#17)
* post-installation tasks OCP4 * Update proc_allowing-external-access-knative-services-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update proc_allowing-external-access-knative-services-OCP-4x.adoc * Update proc_allowing-external-access-knative-services-OCP-4x.adoc * Update proc_allowing-external-access-knative-services-OCP-4x.adoc * separating procedure * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc * Update assembly_knative-OCP-4x.adoc
1 parent 5db8d68 commit 9fcba85

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This assembly is included in the following assemblies:
2+
//
3+
// assembly_knative-OCP-4x.adoc
4+
5+
6+
[id='allowing-external-access-knative-services-OCP-4x_{context}]
7+
= Allowing external access to Knative services on OCP 4.0
8+
9+
Use a configured hostname to access Knative services on the OpenShift 4.0 cluster.
10+
11+
// Updating Knative's config-domain ConfigMap and replacing "example.com" with your domain's suffix
12+
include::proc_updating-knative-config-domain-OCP-4x.adoc[leveloffset=+1]
13+
14+
// Creating an OpenShift Route pointing to the istio-ingressgateway for each of your Knative Service
15+
include::proc_creating-OCP-route-pointing-istio.adoc[leveloffset=+1]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// This module is included in the following assemblies:
2+
//
3+
// assembly_allowing-external-access-knative-services-OCP-4x.adoc
4+
5+
6+
[id='creating-OCP-route-pointing-istio_{context}']
7+
= Creating an OpenShift Route pointing to the istio-ingressgateway for each of your Knative Service.
8+
9+
10+
.Procedure
11+
12+
. Create a yaml file, "my-route.yaml" with the following contents:
13+
.. Replace <YOUR KNATIVE SERVICE NAME> with your knative service name;
14+
.. Replace <YOUR NAMESPACE> with your service's namespace;
15+
.. Replace <YOUR CLUSTER SUFFIX> with the value output by the `oc get` command in the previous step.
16+
17+
apiVersion: v1
18+
kind: Route
19+
metadata:
20+
name: <YOUR KNATIVE SERVICE NAME>
21+
namespace: istio-system
22+
spec:
23+
host: <YOUR KNATIVE SERVICE NAME>.<YOUR NAMESPACE>.<YOUR CLUSTER SUFFIX>
24+
to:
25+
kind: Service
26+
name: istio-ingressgateway
27+
28+
. Run the following yaml file command:
29+
30+
`oc apply -f my-route.yaml`
31+
32+
NOTE: If you previously deployed Knative Services, you will need to redeploy them for the changes to the domain ConfgMap to take effect.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This module is included in the following assemblies:
2+
//
3+
// assembly_allowing-external-access-knative-services-OCP-4x.adoc
4+
5+
6+
[id='updating-knative-config-domain-OCP-4x_{context}']
7+
= Updating Knative's config-domain ConfigMap and replacing "example.com" with your domain's suffix
8+
9+
.Procedure
10+
11+
. Find your cluster's domain suffix by using the following command:
12+
13+
`oc get ingresses.config.openshift.io cluster -o jsonpath="{.spec.domain}"`
14+
15+
. Edit Knative's config-domain ConfigMap and replace "example.com" with <YOUR CLUSTER SUFFIX> by using the following command:
16+
17+
`oc edit configmap config-domain -n knative-serving`
18+

0 commit comments

Comments
 (0)