You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Creating a custom domain mapping by using the Knative CLI
9
9
10
-
You can use the `kn` CLI to create a `DomainMapping` custom resource (CR) that maps to an Addressable target CR, such as a Knative service or a Knative route.
11
-
12
-
The `--ref` flag specifies an Addressable target CR for domain mapping.
13
-
14
-
If a prefix is not provided when using the `--ref` flag, it is assumed that the target is a Knative service in the current namespace. The examples in the following procedure show the prefixes for mapping to a Knative service or a Knative route.
10
+
You can customize the domain for your Knative service by mapping a custom domain name that you own to a Knative service. You can use the Knative (`kn`) CLI to create a `DomainMapping` custom resource (CR) that maps to an Addressable target CR, such as a Knative service or a Knative route.
Copy file name to clipboardExpand all lines: modules/serverless-create-domain-mapping.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
[id="serverless-create-domain-mapping_{context}"]
7
7
= Creating a custom domain mapping
8
8
9
-
To map a custom domain name to a custom resource (CR), you must create a `DomainMapping` CR that maps to an Addressable target CR, such as a Knative service or a Knative route.
9
+
You can customize the domain for your Knative service by mapping a custom domain name that you own to a Knative service. To map a custom domain name to a custom resource (CR), you must create a `DomainMapping` CR that maps to an Addressable target CR, such as a Knative service or a Knative route.
= Adding a custom TLS certificate to a DomainMapping CR
7
+
= Securing a service with a custom domain by using a TLS certificate
8
8
9
-
You can add an existing TLS certificate with a `DomainMapping`custom resource (CR) to secure the mapped service.
9
+
After you have configured a custom domain for a Knative service, you can use a TLS certificate to secure the mapped service. To do this, you must create a Kubernetes TLS secret, and then update the `DomainMapping`CR to use the TLS secret that you have created.
10
10
11
11
.Prerequisites
12
12
@@ -27,7 +27,7 @@ You can add an existing TLS certificate with a `DomainMapping` custom resource (
If you have cluster administrator permissions, you can create a `DomainMapping` custom resource (CR) by using the *Administrator* perspective in the {product-title} web console.
= Mapping a custom domain to a service by using the Developer perspective
8
8
9
-
You can use the *Developer* perspective of the {product-title} web console to map a `DomainMapping` custom resource (CR) to a Knative service.
9
+
You can customize the domain for your Knative service by mapping a custom domain name that you own to a Knative service. You can use the *Developer* perspective of the {product-title} web console to map a `DomainMapping` custom resource (CR) to a Knative service.
Copy file name to clipboardExpand all lines: modules/serverless-ossm-v1x-jwt.adoc
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,52 @@
6
6
[id="serverless-ossm-v1x-jwt_{context}"]
7
7
= Using JSON Web Token authentication with {SMProductShortName} 1.x and {ServerlessProductName}
8
8
9
-
You can use the following procedure to enable using JSON Web Token authentication with {SMProductShortName} 1.x and {ServerlessProductName}.
9
+
You can use JSON Web Token (JWT) authentication with Knative services by using {SMProductShortName} 1.x and {ServerlessProductName}. To do this, you must create a policy in the application namespace that is a member of the `ServiceMeshMemberRoll` object. You must also enable sidecar injection for the service.
10
+
11
+
[IMPORTANT]
12
+
====
13
+
Adding sidecar injection to pods in system namespaces, such as `knative-serving` and `knative-serving-ingress`, is not supported when Kourier is enabled.
14
+
15
+
ifdef::openshift-enterprise[]
16
+
If you require sidecar injection for pods in these namespaces, see the {ServerlessProductName} documentation on _Integrating {SMProductShortName} with {ServerlessProductName} natively_.
17
+
endif::[]
18
+
====
10
19
11
20
.Prerequisites
12
21
13
-
* You have installed the {ServerlessOperatorName} and Knative Serving.
22
+
* You have installed the {ServerlessOperatorName}, Knative Serving, and {SMProductName} on your cluster.
14
23
* Install the OpenShift CLI (`oc`).
15
24
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
16
25
17
26
.Procedure
18
27
28
+
. Add the `sidecar.istio.io/inject="true"` annotation to your service:
<1> Add the `sidecar.istio.io/inject="true"` annotation.
46
+
<2> You must set the annotation `sidecar.istio.io/rewriteAppHTTPProbers: "true"` in your Knative service, because {ServerlessProductName} versions 1.14.0 and higher use an HTTP probe as the readiness probe for Knative services by default.
47
+
48
+
. Apply the `Service` resource:
49
+
+
50
+
[source,terminal]
51
+
----
52
+
$ oc apply -f <filename>
53
+
----
54
+
19
55
. Create a policy in a serverless application namespace which is a member in the `ServiceMeshMemberRoll` object, that only allows requests with valid JSON Web Tokens (JWT):
20
56
+
21
57
[IMPORTANT]
@@ -43,6 +79,7 @@ spec:
43
79
----
44
80
<1> The path on your application to collect metrics by system pod.
45
81
<2> The path on your application to probe by system pod.
0 commit comments