From a783d6cde3fb4daceaec18b0fc2d86291cf6628e Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Wed, 30 Sep 2020 13:29:08 +0300 Subject: [PATCH] Add section to configure labels (#1610) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add section to configure labels Signed-off-by: Anatolii Bazko * Fix Signed-off-by: Anatolii Bazko * Fixes Signed-off-by: Anatolii Bazko * Fix doc accordingly to the new fields Signed-off-by: Anatolii Bazko * Update modules/installation-guide/partials/proc_configuring-labels-for-routes-ingresses.adoc Co-authored-by: Fabrice Flore-Thébault * Update modules/installation-guide/partials/proc_configuring-labels-for-routes-ingresses.adoc Co-authored-by: Fabrice Flore-Thébault * Update modules/installation-guide/partials/proc_configuring-labels-for-routes-ingresses.adoc Co-authored-by: Fabrice Flore-Thébault * Fix remarks Signed-off-by: Anatolii Bazko * Fix remarks Signed-off-by: Anatolii Bazko * Update modules/installation-guide/partials/proc_configuring-labels-for-routes.adoc Co-authored-by: Fabrice Flore-Thébault --- modules/installation-guide/nav.adoc | 4 ++- .../configuring-labels-for-ingresses.adoc | 7 ++++ .../pages/configuring-labels-for-routes.adoc | 7 ++++ .../assembly_advanced-configuration.adoc | 4 +++ ...proc_configuring-labels-for-ingresses.adoc | 35 +++++++++++++++++++ .../proc_configuring-labels-for-routes.adoc | 35 +++++++++++++++++++ 6 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 modules/installation-guide/pages/configuring-labels-for-ingresses.adoc create mode 100644 modules/installation-guide/pages/configuring-labels-for-routes.adoc create mode 100644 modules/installation-guide/partials/proc_configuring-labels-for-ingresses.adoc create mode 100644 modules/installation-guide/partials/proc_configuring-labels-for-routes.adoc diff --git a/modules/installation-guide/nav.adoc b/modules/installation-guide/nav.adoc index 5ffa8efcff..0052f91157 100644 --- a/modules/installation-guide/nav.adoc +++ b/modules/installation-guide/nav.adoc @@ -1,5 +1,5 @@ .Installation Guide - + * xref:supported-platforms.adoc[] * xref:configuring-the-che-installation.adoc[] @@ -35,6 +35,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-for-routes.adoc[] ** xref:deploying-che-with-support-for-git-repositories-with-self-signed-certificates.adoc[] ** xref:installing-che-using-storage-classes.adoc[] ** xref:configuring-storage-types.adoc[] diff --git a/modules/installation-guide/pages/configuring-labels-for-ingresses.adoc b/modules/installation-guide/pages/configuring-labels-for-ingresses.adoc new file mode 100644 index 0000000000..26339045cf --- /dev/null +++ b/modules/installation-guide/pages/configuring-labels-for-ingresses.adoc @@ -0,0 +1,7 @@ +[id="configuring-labels-for-ingresses"] +// = Configuring Labels +:navtitle: Configuring labels for Kubernetes 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-labels-for-routes.adoc b/modules/installation-guide/pages/configuring-labels-for-routes.adoc new file mode 100644 index 0000000000..4e0230bc4e --- /dev/null +++ b/modules/installation-guide/pages/configuring-labels-for-routes.adoc @@ -0,0 +1,7 @@ +[id="configuring-labels-for-routes"] +// = Configuring Labels +:navtitle: Configuring labels for OpenShift Route +:keywords: installation-guide, configuring-labels +:page-aliases: .:configuring-labels-for-routes + +include::partial$proc_configuring-labels-for-routes.adoc[] diff --git a/modules/installation-guide/partials/assembly_advanced-configuration.adoc b/modules/installation-guide/partials/assembly_advanced-configuration.adoc index 0be4df694a..d6aec7b0d6 100644 --- a/modules/installation-guide/partials/assembly_advanced-configuration.adoc +++ b/modules/installation-guide/partials/assembly_advanced-configuration.adoc @@ -20,6 +20,10 @@ The next sections describe some specific user stories. * xref:configuring-che-hostname.adoc[] +* xref:configuring-labels-for-ingresses.adoc[] + +* xref:configuring-labels-for-routes.adoc[] + * xref:deploying-che-with-support-for-git-repositories-with-self-signed-certificates.adoc[] * xref:installing-che-using-storage-classes.adoc[] diff --git a/modules/installation-guide/partials/proc_configuring-labels-for-ingresses.adoc b/modules/installation-guide/partials/proc_configuring-labels-for-ingresses.adoc new file mode 100644 index 0000000000..1a06da8df5 --- /dev/null +++ b/modules/installation-guide/partials/proc_configuring-labels-for-ingresses.adoc @@ -0,0 +1,35 @@ + +[id="configuring-labels-for-ingresses_{context}"] += Configuring labels for Kubernetes Ingress + +This procedure describes how to configure labels for Kubernetes 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 Kubernetes 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-for-routes.adoc b/modules/installation-guide/partials/proc_configuring-labels-for-routes.adoc new file mode 100644 index 0000000000..26b0c86195 --- /dev/null +++ b/modules/installation-guide/partials/proc_configuring-labels-for-routes.adoc @@ -0,0 +1,35 @@ + +[id="configuring-labels-for-routes_{context}"] += Configuring labels for OpenShift Route + +This procedure describes how to configure labels for OpenShift Route to organize and categorize (scope and select) objects. + +.Prerequisites + +* The `{orch-cli}` tool is available. +* An instance of {prod-short} running in OpenShift. + +IMPORTANT: Use comma to separate labels: `key1=value1,key2=value2` + +.Procedure + +. To configure labels for OpenShift Route 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/cheServerRoute/labels",'\ +'"value": "____"}]' + +$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/auth/identityProviderRoute/labels", '\ +'"value": "____"}]' + +$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/labels", '\ +'"value": "____"}]' + +$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \ +'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/labels", '\ +'"value": "____"}]' +----