From 3f222f6b07ca907b24058469655db91f7d0b290f Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 8 Jun 2021 17:29:32 +0300 Subject: [PATCH 1/6] fix: add how to configure annotations Signed-off-by: Anatolii Bazko --- modules/installation-guide/nav.adoc | 4 +- ...iguring-labels-and-domains-for-routes.adoc | 7 - .../configuring-labels-for-ingresses.adoc | 6 - .../assembly_advanced-configuration.adoc | 6 +- ...iguring-labels-and-domains-for-routes.adoc | 144 ------------------ ...proc_configuring-labels-for-ingresses.adoc | 35 ----- 6 files changed, 5 insertions(+), 197 deletions(-) delete mode 100644 modules/installation-guide/pages/configuring-labels-and-domains-for-routes.adoc delete mode 100644 modules/installation-guide/pages/configuring-labels-for-ingresses.adoc delete mode 100644 modules/installation-guide/partials/proc_configuring-labels-and-domains-for-routes.adoc delete mode 100644 modules/installation-guide/partials/proc_configuring-labels-for-ingresses.adoc diff --git a/modules/installation-guide/nav.adoc b/modules/installation-guide/nav.adoc index 49cfdec30c..8b52967118 100644 --- a/modules/installation-guide/nav.adoc +++ b/modules/installation-guide/nav.adoc @@ -39,8 +39,8 @@ ** xref:configuring-workspace-exposure-strategies.adoc[] ** xref:configuring-workspaces-nodeselector.adoc[] ** xref:configuring-che-hostname.adoc[] -** xref:configuring-labels-for-ingresses.adoc[] -** xref:configuring-labels-and-domains-for-routes.adoc[] +** xref:configuring-ingresses.adoc[] +** xref:configuring-routes.adoc[] ** xref:deploying-che-with-support-for-git-repositories-with-self-signed-certificates.adoc[] ** xref:installing-che-using-storage-classes.adoc[] ** xref:importing-untrusted-tls-certificates.adoc[] diff --git a/modules/installation-guide/pages/configuring-labels-and-domains-for-routes.adoc b/modules/installation-guide/pages/configuring-labels-and-domains-for-routes.adoc deleted file mode 100644 index d7460e28d6..0000000000 --- a/modules/installation-guide/pages/configuring-labels-and-domains-for-routes.adoc +++ /dev/null @@ -1,7 +0,0 @@ -[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[] diff --git a/modules/installation-guide/pages/configuring-labels-for-ingresses.adoc b/modules/installation-guide/pages/configuring-labels-for-ingresses.adoc deleted file mode 100644 index d167a94b16..0000000000 --- a/modules/installation-guide/pages/configuring-labels-for-ingresses.adoc +++ /dev/null @@ -1,6 +0,0 @@ -[id="configuring-labels-for-ingresses"] -:navtitle: Configuring labels for {orch-ingress} -:keywords: installation-guide, configuring-labels -:page-aliases: .:configuring-labels-for-ingresses - -include::partial$proc_configuring-labels-for-ingresses.adoc[] diff --git a/modules/installation-guide/partials/assembly_advanced-configuration.adoc b/modules/installation-guide/partials/assembly_advanced-configuration.adoc index bc9c97c8a9..4086641a31 100644 --- a/modules/installation-guide/partials/assembly_advanced-configuration.adoc +++ b/modules/installation-guide/partials/assembly_advanced-configuration.adoc @@ -16,15 +16,15 @@ The next sections describe some specific user stories. * xref:configuring-namespace-strategies.adoc[] -* xref:configuring-the-number-of-workspaces-a-user-can-run.adoc[] +* xref:configuring-the-number-of-workspaces-a-user-can-run.adoc[] * xref:configuring-workspaces-nodeselector.adoc[] * xref:configuring-che-hostname.adoc[] -* xref:configuring-labels-for-ingresses.adoc[] +* xref:configuring-ingresses.adoc[] -* xref:configuring-labels-and-domains-for-routes.adoc[] +* xref:configuring-routes.adoc[] * xref:deploying-che-with-support-for-git-repositories-with-self-signed-certificates.adoc[] diff --git a/modules/installation-guide/partials/proc_configuring-labels-and-domains-for-routes.adoc b/modules/installation-guide/partials/proc_configuring-labels-and-domains-for-routes.adoc deleted file mode 100644 index a3b4143e0f..0000000000 --- a/modules/installation-guide/partials/proc_configuring-labels-and-domains-for-routes.adoc +++ /dev/null @@ -1,144 +0,0 @@ - -[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: <1> - domain: <2> - pluginRegistryRoute: - labels: <1> - domain: <2> - cheServerRoute: - labels: <1> - domain: <2> - customCheProperties: - CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <1> - CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <2> - auth: - identityProviderRoute: - labels: <1> - 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: <1> - domain: <2> - pluginRegistryRoute: - labels: <1> - domain: <2> - cheServerRoute: - labels: <1> - domain: <2> - customCheProperties: - CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <1> - CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <2> - auth: - identityProviderRoute: - labels: <1> - 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"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/cheServerRoute/labels",'\ -'"value": "____"}]' ----- -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/cheServerRoute/domain",'\ -'"value": "____"}]' ----- -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/labels", '\ -'"value": "____"}]' ----- -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/auth/identityProviderRoute/domain", '\ -'"value": "____"}]' ----- -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/domain", '\ -'"value": "____"}]' ----- -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/labels", '\ -'"value": "____"}]' ----- -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/domain", '\ -'"value": "____"}]' ----- -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_OPENSHIFT_ROUTE_LABELS", '\ -'"value": "____"}]' ----- -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN______SUFFIX", '\ -'"value": "____"}]' ----- diff --git a/modules/installation-guide/partials/proc_configuring-labels-for-ingresses.adoc b/modules/installation-guide/partials/proc_configuring-labels-for-ingresses.adoc deleted file mode 100644 index b75815f9f3..0000000000 --- a/modules/installation-guide/partials/proc_configuring-labels-for-ingresses.adoc +++ /dev/null @@ -1,35 +0,0 @@ - -[id="configuring-labels-for-ingresses_{context}"] -= Configuring labels for {orch-ingress} - -This procedure describes how to configure labels for {orch-ingress} to organize and categorize (scope and select) objects. - -.Prerequisites - -* The `{orch-cli}` tool is available. -* An instance of {prod-short} running in {orch-name}. - -IMPORTANT: Use comma to separate labels: `key1=value1,key2=value2` - -.Procedure - -. To configure labels for {orch-ingress}, update the Custom Resource with the following commands: -+ -[subs="+quotes,+attributes"] ----- -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/cheServerIngress/labels", '\ -'"value": "____"}]' - -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/auth/identityProviderIngress/labels", '\ -'"value": "____"}]' - -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/pluginRegistryIngress/labels", '\ -'"value": "____"}]' - -$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/devfileRegistryIngress/labels",'\ -'"value": "____"}]' ----- From b59f58bc9ee824900a7a5cc73a3c69cc091b0244 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Wed, 9 Jun 2021 09:58:08 +0300 Subject: [PATCH 2/6] Add missing files Signed-off-by: Anatolii Bazko --- .../pages/configuring-ingresses.adoc | 6 + .../pages/configuring-routes.adoc | 7 + .../partials/proc_configuring-ingresses.adoc | 66 +++++ .../partials/proc_configuring-routes.adoc | 250 ++++++++++++++++++ 4 files changed, 329 insertions(+) create mode 100644 modules/installation-guide/pages/configuring-ingresses.adoc create mode 100644 modules/installation-guide/pages/configuring-routes.adoc create mode 100644 modules/installation-guide/partials/proc_configuring-ingresses.adoc create mode 100644 modules/installation-guide/partials/proc_configuring-routes.adoc diff --git a/modules/installation-guide/pages/configuring-ingresses.adoc b/modules/installation-guide/pages/configuring-ingresses.adoc new file mode 100644 index 0000000000..9bff9bdf3d --- /dev/null +++ b/modules/installation-guide/pages/configuring-ingresses.adoc @@ -0,0 +1,6 @@ +[id="configuring-ingresses"] +:navtitle: Configuring {orch-ingress} +:keywords: installation-guide, configuring-ingresses +:page-aliases: .:configuring-ingresses + +include::partial$proc_configuring-ingresses.adoc[] diff --git a/modules/installation-guide/pages/configuring-routes.adoc b/modules/installation-guide/pages/configuring-routes.adoc new file mode 100644 index 0000000000..09effcbd31 --- /dev/null +++ b/modules/installation-guide/pages/configuring-routes.adoc @@ -0,0 +1,7 @@ +[id="configuring-routes"] +// = Configuring Labels +:navtitle: Configuring OpenShift Route +:keywords: installation-guide, configuring-routes +:page-aliases: .:configuring-routes + +include::partial$proc_configuring-routes.adoc[] diff --git a/modules/installation-guide/partials/proc_configuring-ingresses.adoc b/modules/installation-guide/partials/proc_configuring-ingresses.adoc new file mode 100644 index 0000000000..bf0a90a34e --- /dev/null +++ b/modules/installation-guide/partials/proc_configuring-ingresses.adoc @@ -0,0 +1,66 @@ + +[id="configuring-ingresses_{context}"] += Configuring {orch-ingress} + +This procedure describes how to configure labels and annotations for {orch-ingress} to organize and categorize (scope and select) objects. + +.Prerequisites + +* The `{orch-cli}` tool is available. +* An instance of {prod-short} running in {orch-name}. + + +.Procedure + +. To configure labels for {orch-ingress}, update the Custom Resource with the following commands: ++ +IMPORTANT: Use comma to separate labels: `key1=value1,key2=value2` ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/cheServerIngress/labels", '\ +'"value": "____"}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/auth/identityProviderIngress/labels", '\ +'"value": "____"}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/pluginRegistryIngress/labels", '\ +'"value": "____"}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/devfileRegistryIngress/labels",'\ +'"value": "____"}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/dashboardIngress/labels",'\ +'"value": "____"}]' +---- +. To configure annotations for {orch-ingress}, update the Custom Resource with the following commands: ++ +IMPORTANT: Use object to specify annotations: `{"annotation_1": "value_1", "annotation_2" : "value_2"}` ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/cheServerIngress/annotations", '\ +'"value": ____}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/auth/identityProviderIngress/annotations", '\ +'"value": ____}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/pluginRegistryIngress/annotations", '\ +'"value": ____}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/devfileRegistryIngress/annotations",'\ +'"value": ____}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/dashboardIngress/annotations",'\ +'"value": ____}]' +---- diff --git a/modules/installation-guide/partials/proc_configuring-routes.adoc b/modules/installation-guide/partials/proc_configuring-routes.adoc new file mode 100644 index 0000000000..ef5a051dae --- /dev/null +++ b/modules/installation-guide/partials/proc_configuring-routes.adoc @@ -0,0 +1,250 @@ + +[id="configuring-routes_{context}"] += Configuring OpenShift Route to work with Router Sharding + +This procedure describes how to configure labels, annotations 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: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_2 + pluginRegistryRoute: + labels: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_2 + dashboardRoute: + labels: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_2 + cheServerRoute: + labels: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_2 + customCheProperties: + CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <1> + CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <2> + auth: + identityProviderRoute: + labels: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_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: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_2 + pluginRegistryRoute: + labels: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_2 + dashboardRoute: + labels: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_2 + cheServerRoute: + labels: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_2 + customCheProperties: + CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <1> + CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <2> + auth: + identityProviderRoute: + labels: <1> + domain: <2> + annotations: + annotation_1: value_1 + annotation_2: value_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: ++ +.. To configure labels: ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/cheServerRoute/labels",'\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/labels", '\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/labels", '\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/dashboardRoute/labels", '\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/auth/identityProviderRoute/labels", '\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_OPENSHIFT_ROUTE_LABELS", '\ +'"value": "____"}]' +---- ++ +.. To configure domains: ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/cheServerRoute/domain",'\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/domain", '\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/domain", '\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/dashboardRoute/domain", '\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/auth/identityProviderRoute/domain", '\ +'"value": "____"}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN______SUFFIX", '\ +'"value": "____"}]' +---- ++ +.. To configure annotations: ++ +IMPORTANT: Use object to specify annotations: `{"annotation_1": "value_1", "annotation_2" : "value_2"}` ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/cheServerRoute/annotations",'\ +'"value": ____}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/annotations", '\ +'"value": ____}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/annotations", '\ +'"value": ____}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/dashboardRoute/annotations", '\ +'"value": ____}]' +---- ++ +[subs="+quotes,+attributes"] +---- +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/auth/identityProviderRoute/annotations", '\ +'"value": ____}]' +---- + + + + + + From b55e635ce33d464f2485527cc072d9587ba6e059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Mal=C3=A9=C5=99?= Date: Wed, 9 Jun 2021 11:55:08 +0200 Subject: [PATCH 3/6] Update proc_configuring-routes.adoc --- .../partials/proc_configuring-routes.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/installation-guide/partials/proc_configuring-routes.adoc b/modules/installation-guide/partials/proc_configuring-routes.adoc index ef5a051dae..562d984fcb 100644 --- a/modules/installation-guide/partials/proc_configuring-routes.adoc +++ b/modules/installation-guide/partials/proc_configuring-routes.adoc @@ -2,7 +2,7 @@ [id="configuring-routes_{context}"] = Configuring OpenShift Route to work with Router Sharding -This procedure describes how to configure labels, annotations 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. +This procedure describes how to configure labels, annotations, 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]. The chapter then mentions the configuration process for existing instances or those about to be installed. .Prerequisites @@ -12,7 +12,7 @@ This procedure describes how to configure labels, annotations and domains for Op * 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] +. Enter the {prod-short} 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): @@ -61,14 +61,14 @@ spec: * For a new `{prod-cli}` installation: + -. Configure the the `{prod-cli}` installation using: +. Configure the installation using: + [subs="+quotes,+attributes"] ---- $ {prod-cli} server:deploy --che-operator-cr-patch-yaml=patch.yaml ... ---- + -`patch.yaml` must contain the following: +The `patch.yaml` file must contain the following: + [source,yaml,subs="+quotes"] ---- From b052afd9f4d62880aa32c6e9c55ab8a360a8c203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Mal=C3=A9=C5=99?= Date: Wed, 9 Jun 2021 12:05:46 +0200 Subject: [PATCH 4/6] Update proc_configuring-ingresses.adoc --- .../partials/proc_configuring-ingresses.adoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/installation-guide/partials/proc_configuring-ingresses.adoc b/modules/installation-guide/partials/proc_configuring-ingresses.adoc index bf0a90a34e..ca2401e40c 100644 --- a/modules/installation-guide/partials/proc_configuring-ingresses.adoc +++ b/modules/installation-guide/partials/proc_configuring-ingresses.adoc @@ -2,17 +2,16 @@ [id="configuring-ingresses_{context}"] = Configuring {orch-ingress} -This procedure describes how to configure labels and annotations for {orch-ingress} to organize and categorize (scope and select) objects. +* This procedure describes how to configure labels and annotations for {orch-ingress} to organize and categorize objects by scoping and selecting. .Prerequisites * The `{orch-cli}` tool is available. * An instance of {prod-short} running in {orch-name}. - .Procedure -. To configure labels for {orch-ingress}, update the Custom Resource with the following commands: +. To configure labels for {orch-ingress}, update the Custom Resource: + IMPORTANT: Use comma to separate labels: `key1=value1,key2=value2` + From 95ca93cab11c4bbeb10ff2b19b83a9d1f33cd1d9 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 11 Jun 2021 11:15:34 +0300 Subject: [PATCH 5/6] Minor improvements Signed-off-by: Anatolii Bazko --- .../partials/proc_configuring-ingresses.adoc | 2 +- .../partials/proc_configuring-routes.adoc | 66 ++++++++++--------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/modules/installation-guide/partials/proc_configuring-ingresses.adoc b/modules/installation-guide/partials/proc_configuring-ingresses.adoc index ca2401e40c..adfdc6b403 100644 --- a/modules/installation-guide/partials/proc_configuring-ingresses.adoc +++ b/modules/installation-guide/partials/proc_configuring-ingresses.adoc @@ -39,7 +39,7 @@ $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json ---- . To configure annotations for {orch-ingress}, update the Custom Resource with the following commands: + -IMPORTANT: Use object to specify annotations: `{"annotation_1": "value_1", "annotation_2" : "value_2"}` +IMPORTANT: Use object to specify annotations: `{"key1": "value1", "key2" : "value2"}` + [subs="+quotes,+attributes"] ---- diff --git a/modules/installation-guide/partials/proc_configuring-routes.adoc b/modules/installation-guide/partials/proc_configuring-routes.adoc index 562d984fcb..ce11ef24c6 100644 --- a/modules/installation-guide/partials/proc_configuring-routes.adoc +++ b/modules/installation-guide/partials/proc_configuring-routes.adoc @@ -24,27 +24,27 @@ spec: devfileRegistryRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 pluginRegistryRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 dashboardRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 cheServerRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 customCheProperties: CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <1> CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <2> @@ -52,12 +52,13 @@ spec: identityProviderRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 ---- <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 +<3> unstructured key value map stored with a resource * For a new `{prod-cli}` installation: + @@ -77,27 +78,27 @@ spec: devfileRegistryRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 pluginRegistryRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 dashboardRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 cheServerRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 customCheProperties: CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <1> CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <2> @@ -105,12 +106,13 @@ spec: identityProviderRoute: labels: <1> domain: <2> - annotations: - annotation_1: value_1 - annotation_2: value_2 + annotations: <3> + key1: value1 + key2: value2 ---- <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 +<3> unstructured key value map stored with a resource * For already existing {prod-short} installation: + @@ -118,6 +120,8 @@ spec: + .. To configure labels: + +IMPORTANT: Use comma to separate labels: `key1=value1,key2=value2` ++ [subs="+quotes,+attributes"] ---- $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ @@ -206,7 +210,7 @@ $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json + .. To configure annotations: + -IMPORTANT: Use object to specify annotations: `{"annotation_1": "value_1", "annotation_2" : "value_2"}` +IMPORTANT: Use object to specify annotations: `{"key1": "value1", "key2" : "value2"}` + [subs="+quotes,+attributes"] ---- From 10b79631ae61f85f8b94cf7eb72c850532027169 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 11 Jun 2021 11:25:59 +0300 Subject: [PATCH 6/6] Small fixes Signed-off-by: Anatolii Bazko --- .../partials/proc_configuring-ingresses.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/installation-guide/partials/proc_configuring-ingresses.adoc b/modules/installation-guide/partials/proc_configuring-ingresses.adoc index adfdc6b403..dc4ca2d269 100644 --- a/modules/installation-guide/partials/proc_configuring-ingresses.adoc +++ b/modules/installation-guide/partials/proc_configuring-ingresses.adoc @@ -36,6 +36,10 @@ $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ '[{"op": "replace", "path": "/spec/server/dashboardIngress/labels",'\ '"value": "____"}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_KUBERNETES_INGRESS_LABELS", '\ +'"value": "____"}]' ---- . To configure annotations for {orch-ingress}, update the Custom Resource with the following commands: + @@ -62,4 +66,8 @@ $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ '[{"op": "replace", "path": "/spec/server/dashboardIngress/annotations",'\ '"value": ____}]' + +$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS______JSON", '\ +'"value": "____"}]' ----