3.2.5. ユーザーによるワークスペースのデプロイメントラベルおよびアノテーションの定義を許可する
本セクションでは、factory パラメーターを使用してワークスペースのデプロイメントのラベルとアノテーションをカスタマイズする方法を説明します。
前提条件
- Red Hat CodeReady Workspaces の実行中のインスタンス。Red Hat CodeReady Workspaces のインスタンスをインストールするには、「CodeReady Workspaces の インストール 」を参照してください。
-
一般にアクセス可能なスタンドアロン
devfile.yaml
ファイル。devfile の作成および使用に関する詳細は、「devfile を使用したワークスペースの設定」 を参照してください。
手順
-
URL
\https://codeready-<openshift_deployment_name>.<domain_name>/f?url=https://<hostURL>/devfile.yaml&workspaceDeploymentLabels=<url_encoded_comma_separated_key_values>&workspaceDeploymentAnnotations=<url_encoded_comma_separated_key_values override>
に移動してワークスペースを開きます。
deployment labels
を上書きする例
追加する以下のラベルについて検討します。
ike.target=preference-v1 ike.session=test
ike.target=preference-v1
ike.session=test
ラベルを追加または上書きするには、以下のファクトリー URL を使用します。
https://workspaces.openshift.com/f?url=<repository-url>&workspaceDeploymentLabels=ike.target%3Dpreference-v1%2Cike.session%3Dtest
https://workspaces.openshift.com/f?url=<repository-url>&workspaceDeploymentLabels=ike.target%3Dpreference-v1%2Cike.session%3Dtest
作成されるワークスペースには、以下のデプロイメントラベルが含まれます。
deployment annotations
を上書きする例
追加する以下のアノテーションについて検討します。
ike.A1=preference-v1 ike.A=test
ike.A1=preference-v1
ike.A=test
アノテーションを追加または上書きするには、以下のファクトリー URL を使用します。
https://workspaces.openshift.com/f?url=<repository-url>&workspaceDeploymentAnnotations=ike.A1%3Dpreference-v1%2Cike.A%3Dtest
https://workspaces.openshift.com/f?url=<repository-url>&workspaceDeploymentAnnotations=ike.A1%3Dpreference-v1%2Cike.A%3Dtest
生成されるワークスペースには、以下のデプロイメントアノテーションが含まれます。