Skip to content

Commit

Permalink
Add section to configure labels (#1610)
Browse files Browse the repository at this point in the history
* Add section to configure labels

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* Fix

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* Fixes

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* Fix doc accordingly to the new fields

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* Update modules/installation-guide/partials/proc_configuring-labels-for-routes-ingresses.adoc

Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com>

* Update modules/installation-guide/partials/proc_configuring-labels-for-routes-ingresses.adoc

Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com>

* Update modules/installation-guide/partials/proc_configuring-labels-for-routes-ingresses.adoc

Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com>

* Fix remarks

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* Fix remarks

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* Update modules/installation-guide/partials/proc_configuring-labels-for-routes.adoc

Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com>
  • Loading branch information
tolusha and themr0c committed Sep 30, 2020
1 parent 2dc8f3a commit a783d6c
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/installation-guide/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.Installation Guide

* xref:supported-platforms.adoc[]
* xref:configuring-the-che-installation.adoc[]
Expand Down Expand Up @@ -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[]
Expand Down
Original file line number Diff line number Diff line change
@@ -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[]
Original file line number Diff line number Diff line change
@@ -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[]
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
Original file line number Diff line number Diff line change
@@ -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": "__<labels for a {prod-id-short} server ingress>__"}]'
$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \
'[{"op": "replace", "path": "/spec/auth/identityProviderIngress/labels", '\
'"value": "__<labels for a {identity-provider} ingress>__"}]'
$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \
'[{"op": "replace", "path": "/spec/server/pluginRegistryIngress/labels", '\
'"value": "__<labels for a plugin registry ingress>__"}]'
$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \
'[{"op": "replace", "path": "/spec/server/devfileRegistryIngress/labels",'\
'"value": "__<labels for a devfile registry ingress>__"}]'
----
Original file line number Diff line number Diff line change
@@ -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": "__<labels for a {prod-id-short} server route>__"}]'
$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \
'[{"op": "replace", "path": "/spec/auth/identityProviderRoute/labels", '\
'"value": "__<labels for a {identity-provider} route>__"}]'
$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \
'[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/labels", '\
'"value": "__<labels for a plugin registry route>__"}]'
$ {orch-cli} patch checluster {prod-checluster} -n {prod-namespace} --type=json -p \
'[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/labels", '\
'"value": "__<labels for a devfile registry route>__"}]'
----

0 comments on commit a783d6c

Please sign in to comment.