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 kubectl tool is available.

  • An instance of Che running in OpenShift.

Use comma to separate labels: key1=value1,key2=value2
Procedure
  1. To configure labels for OpenShift Route update the Custom Resource with the following commands:

    $ kubectl patch checluster eclipse-che -n eclipse-che --type=json -p \
    '[{"op": "replace", "path": "/spec/server/cheServerRoute/labels",'\
    '"value": "<labels for a che server route>"}]'
    
    $ kubectl patch checluster eclipse-che -n eclipse-che --type=json -p \
    '[{"op": "replace", "path": "/spec/auth/identityProviderRoute/labels", '\
    '"value": "<labels for a Keycloak route>"}]'
    
    $ kubectl patch checluster eclipse-che -n eclipse-che --type=json -p \
    '[{"op": "replace", "path": "/spec/server/pluginRegistryRoute/labels", '\
    '"value": "<labels for a plugin registry route>"}]'
    
    $ kubectl patch checluster eclipse-che -n eclipse-che --type=json -p \
    '[{"op": "replace", "path": "/spec/server/devfileRegistryRoute/labels", '\
    '"value": "<labels for a devfile registry route>"}]'