-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure labels and domains to work with router sharding (#1887)
* Configure labels and domains to work with router sharding Signed-off-by: Anatolii Bazko <abazko@redhat.com> * Add missing files Signed-off-by: Anatolii Bazko <abazko@redhat.com> * improvements Signed-off-by: Anatolii Bazko <abazko@redhat.com> * Fix Signed-off-by: Anatolii Bazko <abazko@redhat.com> Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> Co-authored-by: Michal Maléř <48474054+MichalMaler@users.noreply.github.com>
- Loading branch information
1 parent
cfad5d3
commit 023993e
Showing
7 changed files
with
162 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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 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
7 changes: 7 additions & 0 deletions
7
modules/installation-guide/pages/configuring-labels-and-domains-for-routes.adoc
This file contains 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,7 @@ | ||
[id="configuring-labels-and-domains-for-routes"] | ||
// = Configuring Labels | ||
:navtitle: Configuring labels and domains for OpenShift Route | ||
:keywords: installation-guide, configuring-labels, configuring-domains | ||
:page-aliases: .:configuring-labels-and-domains-for-routes | ||
|
||
include::partial$proc_configuring-labels-and-domains-for-routes.adoc[] |
7 changes: 0 additions & 7 deletions
7
modules/installation-guide/pages/configuring-labels-for-routes.adoc
This file was deleted.
Oops, something went wrong.
This file contains 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
144 changes: 144 additions & 0 deletions
144
...installation-guide/partials/proc_configuring-labels-and-domains-for-routes.adoc
This file contains 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,144 @@ | ||
|
||
[id="configuring-labels-for-routes_{context}"] | ||
= Configuring labels and domains for OpenShift Route to work with Router Sharding | ||
|
||
This procedure describes how to configure labels and domains for OpenShift Route to work with link:https://docs.openshift.com/container-platform/4.7/networking/ingress-operator.html#nw-ingress-sharding_configuring-ingress[Router Sharding] and mentions how to do so on existing instances or those about to be installed. | ||
|
||
.Prerequisites | ||
|
||
* The `oc` and `{prod-cli}` tool is available. | ||
|
||
.Procedure | ||
|
||
* For a new OperatorHub installation: | ||
+ | ||
. Enter the {prod} Cluster using {ocp} and create CheCluster Custom Resource (CR). See, xref:installing-che-on-openshift-4-using-operatorhub#creating-an-instance-of-the-{prod-id-short}-operator_{context}[Creating an instance of the {prod} Operator] | ||
|
||
+ | ||
. Set the following values in {prod-checluster} Custom Resource (CR): | ||
+ | ||
[source,yaml,subs="+quotes"] | ||
---- | ||
spec: | ||
server: | ||
devfileRegistryRoute: | ||
labels: <labels> <1> | ||
domain: <domain> <2> | ||
pluginRegistryRoute: | ||
labels: <labels> <1> | ||
domain: <domain> <2> | ||
cheServerRoute: | ||
labels: <labels> <1> | ||
domain: <domain> <2> | ||
customCheProperties: | ||
CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <labels> <1> | ||
CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <domain> <2> | ||
auth: | ||
identityProviderRoute: | ||
labels: <labels> <1> | ||
domain: <domain> <2> | ||
---- | ||
<1> comma separated list of labels that are used by the target ingress controller to filter the set of Routes to service | ||
<2> DNS name serviced by the target ingress controller | ||
|
||
* For a new `{prod-cli}` installation: | ||
+ | ||
. Configure the the `{prod-cli}` installation using: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ {prod-cli} server:deploy --che-operator-cr-patch-yaml=patch.yaml ... | ||
---- | ||
+ | ||
`patch.yaml` must contain the following: | ||
+ | ||
[source,yaml,subs="+quotes"] | ||
---- | ||
spec: | ||
server: | ||
devfileRegistryRoute: | ||
labels: <labels> <1> | ||
domain: <domain> <2> | ||
pluginRegistryRoute: | ||
labels: <labels> <1> | ||
domain: <domain> <2> | ||
cheServerRoute: | ||
labels: <labels> <1> | ||
domain: <domain> <2> | ||
customCheProperties: | ||
CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <labels> <1> | ||
CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <domain> <2> | ||
auth: | ||
identityProviderRoute: | ||
labels: <labels> <1> | ||
domain: <domain> <2> | ||
---- | ||
<1> comma separated list of labels that are used by the target ingress controller to filter the set of Routes to service | ||
<2> DNS name serviced by the target ingress controller | ||
|
||
* For already existing {prod-short} installation: | ||
+ | ||
. Update `{prod-checluster}` CR using the `{orch-cli}` tool: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/cheServerRoute/labels",'\ | ||
'"value": "__<labels for a {prod-id-short} server route>__"}]' | ||
---- | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/cheServerRoute/domain",'\ | ||
'"value": "__<ingress domain>__"}]' | ||
---- | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/labels", '\ | ||
'"value": "__<labels for a plugin registry route>__"}]' | ||
---- | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/auth/identityProviderRoute/domain", '\ | ||
'"value": "__<ingress domain>__"}]' | ||
---- | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/domain", '\ | ||
'"value": "__<ingress domain>__"}]' | ||
---- | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/labels", '\ | ||
'"value": "__<labels for a devfile registry route>__"}]' | ||
---- | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/domain", '\ | ||
'"value": "__<ingress domain>__"}]' | ||
---- | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_OPENSHIFT_ROUTE_LABELS", '\ | ||
'"value": "__<labels for a workspace routes>__"}]' | ||
---- | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN______SUFFIX", '\ | ||
'"value": "__<ingress domain>__"}]' | ||
---- |
35 changes: 0 additions & 35 deletions
35
modules/installation-guide/partials/proc_configuring-labels-for-routes.adoc
This file was deleted.
Oops, something went wrong.