-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[SRVLS][SRVKS-681] Domain mapping for ksvcs #29500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * serverless/networking/serverless-domain-mapping.adoc | ||
|
||
[id="serverless-create-domain-mapping_{context}"] | ||
= Creating custom domain mapping for a service | ||
|
||
To map a custom domain name to a service you must create a `DomainMapping` custom resource (CR). | ||
|
||
.Prerequisites | ||
|
||
* The {ServerlessOperatorName} and Knative Serving are installed on your cluster. | ||
* You have created a Knative service and control a custom domain that you want to map to that service. | ||
+ | ||
[NOTE] | ||
==== | ||
Your custom domain must point to the DNS of the {product-title} cluster. | ||
==== | ||
|
||
.Procedure | ||
|
||
. Create a YAML file containing the `DomainMapping` CR in the same namespace as the Knative service you want to map to: | ||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: serving.knative.dev/v1alpha1 | ||
kind: DomainMapping | ||
metadata: | ||
name: <domain_name> <1> | ||
namespace: <namespace> <2> | ||
spec: | ||
ref: | ||
name: <service_name> <3> | ||
kind: Service | ||
apiVersion: serving.knative.dev/v1 | ||
---- | ||
<1> The custom domain name that you want to map to the service. | ||
<2> The namespace of both the `DomainMapping` CR and the Knative service. | ||
abrennan89 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
<3> The name of the service to map to the custom domain. | ||
|
||
. Apply the `DomainMapping` CR as a YAML file: | ||
abrennan89 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
+ | ||
[source,terminal] | ||
---- | ||
$ oc apply -f <filename> | ||
---- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
include::modules/serverless-document-attributes.adoc[] | ||
[id="serverless-domain-mapping"] | ||
= Mapping a custom domain name to a service | ||
:context: serverless-domain-mapping | ||
include::modules/common-attributes.adoc[] | ||
|
||
toc::[] | ||
|
||
Knative Services are automatically assigned a default domain name based on your cluster configuration. For example, `<service_name>.<namespace>.example.com`. | ||
You can map a custom domain name that you own to a Knative service by creating a `DomainMapping` custom resource (CR) for the service. | ||
You can also create multiple CRs to map multiple domains and subdomains to a single service. | ||
|
||
include::modules/serverless-create-domain-mapping.adoc[leveloffset=+1] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.