4.9. OpenShift Route のラベルの設定

この手順では、OpenShift Route のラベルを、オブジェクトを整理し、分類 (スコープおよび選択)するように設定する方法を説明します。

前提条件

  • oc ツールが利用できる。
  • OpenShift で実行される CodeReady Workspaces のインスタンス。
重要

コンマを使用して、ラベルを区切ります: key1=value1,key2=value2

手順

  1. OpenShift Route のラベルを設定するには、以下のコマンドを使用してカスタムリソースを更新します。

    $ oc patch checluster codeready-workspaces -n openshift-workspaces --type=json -p \
    '[{"op": "replace", "path": "/spec/server/cheServerIngress/labels", '\
    '"value": "<labels for a codeready-workspaces server ingress>"}]'
    
    $ oc patch checluster codeready-workspaces -n openshift-workspaces --type=json -p \
    '[{"op": "replace", "path": "/spec/auth/identityProviderIngress/labels", '\
    '"value": "<labels for a RH-SSO ingress>"}]'
    
    $ oc patch checluster codeready-workspaces -n openshift-workspaces --type=json -p \
    '[{"op": "replace", "path": "/spec/server/pluginRegistryIngress/labels", '\
    '"value": "<labels for a plugin registry ingress>"}]'
    
    $ oc patch checluster codeready-workspaces -n openshift-workspaces --type=json -p \
    '[{"op": "replace", "path": "/spec/server/devfileRegistryIngress/labels",'\
    '"value": "<labels for a devfile registry ingress>"}]'