This documentation is for a release that is no longer maintained
See documentation for the latest supported version.6.2. PVC での永続ストレージの要求
次の場合は、PersistentVolumeClaim (PVC) を適用して、ワークスペースの PersistentVolume (PV) を要求することができます。
- プロジェクトのすべての開発者が PV を必要とするわけではありません。
 - PV のライフサイクルは、単一のワークスペースのライフサイクルを超えています。
 - PV に含まれるデータは、ワークスペース間で共有されます。
 
				ワークスペースがエフェメラルであり、その devfile に controller.devfile.io/storage-type: ephemeral 属性が含まれている場合でも、PVC を DevWorkspace コンテナーに適用できます。
			
前提条件
- ワークスペースを開始していない。
 - 
						宛先 OpenShift クラスターへの管理権限を持つアクティブな 
ocセッション。Getting started with the CLI を参照。 - 
						すべての 
DevWorkspaceコンテナーにマウントするために、ユーザープロジェクトに PVC が作成されます。 
手順
controller.devfile.io/mount-to-devworkspace: trueラベルを PVC に追加します。oc label persistentvolumeclaim <PVC_name> \ controller.devfile.io/mount-to-devworkspace=true
$ oc label persistentvolumeclaim <PVC_name> \ controller.devfile.io/mount-to-devworkspace=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow オプション: アノテーションを使用して、PVC のマウント方法を設定します。
Expand 表6.1 オプションのアノテーション Annotation 説明 controller.devfile.io/mount-path:PVC のマウントパス。
デフォルトは
/tmp/<PVC_name>です。controller.devfile.io/read-only:'true'または'false'に設定して、PVC を読み取り専用としてマウントするかどうかを指定します。デフォルトは
'false'で、PVC は読み取り/書き込みとしてマウントされます。