A Persistent Volume (PV) is used to store a pod's logs, product files, and more while
setting up OMEnvironment through Sterling Order Management System Operator. A PV can either be
dynamically allocated by the cloud platform based on storage classes or it can be configured
manually.
About this task
The following steps explain creating Persistent Volume manually.
Procedure
- Create a Kubernetes PV with access mode as
ReadWriteMany
and a
minimum of 10 GB hard disk space, as illustrated in the following
<sample_pv_file>.yaml example.
Ensure that the PV storage is accessible by all the containers across the cluster and the owner
group of the PersistenceVolume directory has write access, and the owner group ID is specified in
the storage.securityContext.fsGroup
parameter of the OMEnvironment
custom resource.
kind: PersistentVolume
apiVersion: v1
metadata:
name: '<Release-name>-pv-oms'
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
storageClassName: default
- Pass the name for the Persistent Volume Claim (PVC) as a value to the
storage.name
parameter of OMEnvironment. If the PVC exists with that
name, it is reused, else it is created. Ensure that the specification of persistent volume matches
the parameters of storage spec of OMEnvironment.
- Run the following command.
oc create -f <sample_pv_file>.yaml -n <namespace>
A Persistent Volume based on the values that are configured in the
<sample_pv_file>.yaml is created.