Note
|
NFS is not recommended to use with metering. |
Metering has no storage by default, but it can use any ReadWriteMany PersistentVolume or any StorageClass that provisions a ReadWriteMany PersistentVolume.
-
To use a ReadWriteMany PersistentVolume for storage, modify the
shared-storage.yaml
file below.
apiVersion: metering.openshift.io/v1
kind: MeteringConfig
metadata:
name: "operator-metering"
spec:
storage:
type: "hive"
hive:
type: "sharedPVC"
sharedPVC:
claimName: "metering-nfs" (1)
# uncomment the lines below to provision a new PVC using the specified (2)
# storageClass.
# createPVC: true
# storageClass: "my-nfs-storage-class"
# size: 5Gi
Select one of the configuration options below:
-
Set
storage.hive.sharedPVC.claimName
to the name of an existing ReadWriteMany PersistentVolumeClaim (PVC). This is necessary if you do not have dynamic volume provisioning or want to have more control over how the PersistentVolume is created. -
Set
storage.hive.sharedPVC.createPVC
totrue
and set thestorage.hive.sharedPVC.storageClass
to the name of a StorageClass with ReadWriteMany access mode. This will use dynamic volume provisioning to have a volume created automatically.