Setting up PersistentVolume(s)
A PersistentVolume (PV) is a piece of storage in the cluster that is provisioned by an administrator or dynamically provisioned using storage classes.
You can redirect the application logs to console, which is the recommended option, or written
to a file system or a storage location outside the application containers, in which case, you
need to create an additional PersistentVolume for logs.
This volume is further
referenced as logs volume.
Similarly, you must map additional volumes to externalize data generated by the application during runtime, for example, payloads.
- Kubernetes - PersistentVolumes.
- OpenShift - Configuring Persistent Storage.
- If not dynamically provisioned, Create a PersistentVolume for logs with Access mode as
ReadWriteMany
andStorage
less than or equal to 1Gi (can vary based on the size of the expected log files and logging level chosen). - If not dynamically provisioned, Create a PersistentVolume for Documents with Access mode
as
ReadWriteMany
andStorage
less than or equal to 1Gi (can vary based on the number of files being transferred). - If not dynamically provisioned, Create a PersistentVolume for Staging with Access mode as ReadWriteMany and Storage less than or equal to 1Gi (can vary based on the requirements).
When creating PersistentVolumes, you need to make a note of the storage class and metadata labels, which is required to configure the respective PersistentVolume claim’s storage class and label selector in the Helm chart configuration (Refer configuration section for more details) so that the claims are bound to the PersistentVolumes based on the match.
./ibm-gm-prod/ibm_cloud_pak/pak_extensions/pre-install/volume/(logs-pv,
documents-pv, or staging-pv).yaml
. This is only for reference and can be modified
as per the selected storage option/location/size and other available platform options.
You can use the container platform command line or UI to create or update PersistentVolumes. Refer the below example for logs-pv:
kind: PersistentVolume
apiVersion: v1
metadata:
name: gm-logs-pv
labels:
intent: gm-logs
spec:
storageClassName: "standard"
capacity:
storage: 1000Mi
accessModes:
- ReadWriteMany
# hostPath:
# path: "/opt/docker/logs/"
# nfs:
# server: server-ip
# path: /mnt/nfs/data/gm_logs/
hostPath
or nfs
.fsGroup
or supplemental group IDs,
which are configurable using values.yaml
.