mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 09:46:53 +01:00
Merge pull request #16682 from openshift-cherrypick-robot/cherry-pick-16680-to-enterprise-4.2
[enterprise-4.2] Removed configuring knative services section
This commit is contained in:
@@ -1064,8 +1064,6 @@ Topics:
|
||||
### Knative services
|
||||
- Name: Getting started with Knative services
|
||||
File: getting-started-knative-services
|
||||
- Name: Configuring Knative services
|
||||
File: configuring-knative-services
|
||||
### Monitoring
|
||||
- Name: Monitoring OpenShift Serverless components
|
||||
File: monitoring-serverless
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * serverless/getting-started-knative-services.adoc
|
||||
|
||||
[id="configuring-knative-services-domains_{context}"]
|
||||
= Configuring domains for Knative services
|
||||
|
||||
The Red Hat OpenShift Serverless Operator will attempt to find the public domain that is used by the cluster and use that same domain for Knative Services. Having a domain configured makes it possible to reach services in your cluster via HTTP over the internet directly, for example, using the `curl` command.
|
||||
|
||||
Alternatively, you can configure a different domain for Knative services or even configure a different domain for different Knative services based on labels. Once you have completed this configuration, you can create a template for the domain configuration.
|
||||
|
||||
.Procedure
|
||||
. To change the configuration for Knative services, you must edit the `config-domain` ConfigMap in the `knative-serving` namespace using `oc edit`.
|
||||
|
||||
# oc edit cm config-domain -n knative-serving
|
||||
|
||||
. Copy the sample ConfigMap and modify the relevant fields.
|
||||
+
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: config-domain
|
||||
namespace: knative-serving
|
||||
labels:
|
||||
serving.knative.dev/release: devel
|
||||
data:
|
||||
example.com: |
|
||||
----
|
||||
+
|
||||
Here is an example of the configuration for the domain `example.com`, which will be used for routes with the label `app` set to `example`.
|
||||
+
|
||||
[source,yaml]
|
||||
----
|
||||
data:
|
||||
example.com: |
|
||||
selector:
|
||||
app: example
|
||||
----
|
||||
@@ -1,36 +0,0 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * serverless/knative-services.adoc
|
||||
|
||||
[id="domain-templates-knative-services_{context}"]
|
||||
= Defining a template for the configured domain
|
||||
|
||||
.Procedure
|
||||
. Define a `domainTemplate`.
|
||||
+
|
||||
`domainTemplate` specifies the golang text template string to use when constructing the Knative service's DNS name.
|
||||
+
|
||||
The default value is `{{.Name}}.{{.Namespace}}.{{.Domain}}`.
|
||||
+
|
||||
An example of this DNS name would look like `myapp.mynamespace.example.com` for an application called `myapp` with a namespace called `mynamespace`, and `example.com` as the domain.
|
||||
+
|
||||
- You will need to change this value if extra levels in the domain name cause issues. For example, if the wildcard certificate’s domain only supports a single level domain name.
|
||||
|
||||
- To resolve these types of issues, use the format `{{.Name}}-{{.Namespace}}.{{.Domain}}` or remove the Namespace entirely from the template.
|
||||
|
||||
- When choosing a new value, remember that using characters such as dashes in service or namespace names can cause conflicts and should be avoided.
|
||||
+
|
||||
NOTE: It is strongly recommended to keep the namespace part of the template to avoid domain name clashes.
|
||||
+
|
||||
|
||||
. Define a `tagTemplate`.
|
||||
+
|
||||
`tagTemplate` specifies the golang text template string to use when constructing the DNS name for tags within traffic blocks.
|
||||
+
|
||||
Tags are similar to subroutes that enable traffic blocks to specific revisions.
|
||||
Tags are used along with the `domainTemplate` to determine the full URL for the tag in the format `{{.Name}}-{{.Tag}}`.
|
||||
+
|
||||
For example, if your service is called `myapp`, the namespace is `mynamespace`, the domain is `example.com` and the tag you want is `latest`, the generated host will be `myapp-latest.mynamespace.example.com`.
|
||||
|
||||
.Additional resources
|
||||
For more information about golang templates, see the https://www.google.com/url?q=https://golang.org/pkg/text/template/&sa=D&ust=1564657248236000&usg=AFQjCNHYHtGgv1m-F2bBMJaGyOBRBCl_rg[Go package template documentation].
|
||||
@@ -1,14 +0,0 @@
|
||||
[id="configuring-knative-services"]
|
||||
= Configuring Knative services
|
||||
include::modules/common-attributes.adoc[]
|
||||
include::modules/serverless-document-attributes.adoc[]
|
||||
:context: getting-started-knative-services
|
||||
|
||||
toc::[]
|
||||
|
||||
You must configure the 'yaml' file for each Knative service before you can deploy an application.
|
||||
|
||||
This section provides information on basic Knative service `yaml` configuration tasks, such as configuring a domain for the service.
|
||||
|
||||
include::modules/configuring-knative-services-domains.adoc[leveloffset=+1]
|
||||
include::modules/domain-templates-knative-services.adoc[leveloffset=+1]
|
||||
Reference in New Issue
Block a user