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-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-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/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/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-ingresses.adoc b/modules/installation-guide/partials/proc_configuring-ingresses.adoc new file mode 100644 index 0000000000..dc4ca2d269 --- /dev/null +++ b/modules/installation-guide/partials/proc_configuring-ingresses.adoc @@ -0,0 +1,73 @@ + +[id="configuring-ingresses_{context}"] += Configuring {orch-ingress} + +* 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: ++ +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": "____"}]' + +$ {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: ++ +IMPORTANT: Use object to specify annotations: `{"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/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": ____}]' + +$ {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": "____"}]' +---- 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": "____"}]' ----- diff --git a/modules/installation-guide/partials/proc_configuring-labels-and-domains-for-routes.adoc b/modules/installation-guide/partials/proc_configuring-routes.adoc similarity index 50% rename from modules/installation-guide/partials/proc_configuring-labels-and-domains-for-routes.adoc rename to modules/installation-guide/partials/proc_configuring-routes.adoc index a3b4143e0f..ce11ef24c6 100644 --- a/modules/installation-guide/partials/proc_configuring-labels-and-domains-for-routes.adoc +++ b/modules/installation-guide/partials/proc_configuring-routes.adoc @@ -1,8 +1,8 @@ -[id="configuring-labels-for-routes_{context}"] -= Configuring labels and domains for OpenShift Route to work with Router Sharding +[id="configuring-routes_{context}"] += Configuring 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. +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 and domains for OpenShift Route * 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): @@ -24,12 +24,27 @@ spec: devfileRegistryRoute: labels: <1> domain: <2> + annotations: <3> + key1: value1 + key2: value2 pluginRegistryRoute: labels: <1> domain: <2> + annotations: <3> + key1: value1 + key2: value2 + dashboardRoute: + labels: <1> + domain: <2> + annotations: <3> + key1: value1 + key2: value2 cheServerRoute: labels: <1> domain: <2> + annotations: <3> + key1: value1 + key2: value2 customCheProperties: CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <1> CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <2> @@ -37,20 +52,24 @@ spec: identityProviderRoute: labels: <1> domain: <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: + -. 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"] ---- @@ -59,12 +78,27 @@ spec: devfileRegistryRoute: labels: <1> domain: <2> + annotations: <3> + key1: value1 + key2: value2 pluginRegistryRoute: labels: <1> domain: <2> + annotations: <3> + key1: value1 + key2: value2 + dashboardRoute: + labels: <1> + domain: <2> + annotations: <3> + key1: value1 + key2: value2 cheServerRoute: labels: <1> domain: <2> + annotations: <3> + key1: value1 + key2: value2 customCheProperties: CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <1> CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <2> @@ -72,14 +106,22 @@ spec: identityProviderRoute: labels: <1> domain: <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: + . Update `{prod-checluster}` CR using the `{orch-cli}` tool: + +.. 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 \ @@ -90,21 +132,44 @@ $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json [subs="+quotes,+attributes"] ---- $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/cheServerRoute/domain",'\ -'"value": "____"}]' +'[{"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/pluginRegistryRoute/labels", '\ -'"value": "____"}]' +'[{"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/auth/identityProviderRoute/domain", '\ +'[{"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": "____"}]' ---- + @@ -118,22 +183,22 @@ $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json [subs="+quotes,+attributes"] ---- $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ -'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/labels", '\ -'"value": "____"}]' +'[{"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/devfileRegistryRoute/domain", '\ +'[{"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/server/customCheProperties/CHE_INFRA_OPENSHIFT_ROUTE_LABELS", '\ -'"value": "____"}]' +'[{"op": "replace", "path": "/spec/auth/identityProviderRoute/domain", '\ +'"value": "____"}]' ---- + [subs="+quotes,+attributes"] @@ -142,3 +207,48 @@ $ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json '[{"op": "replace", "path": "/spec/server/customCheProperties/CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN______SUFFIX", '\ '"value": "____"}]' ---- ++ +.. To configure annotations: ++ +IMPORTANT: Use object to specify annotations: `{"key1": "value1", "key2" : "value2"}` ++ +[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": ____}]' +---- + + + + + +