i am trying to create mongodb-replicaset with kubernetes-helm on digitalocean using do-block-storage. since mongodb recommended to use xfs format, i try to format do-block-storage with xfs using configuration like below, but it seem didn't work. can you help? thank you.
persistentVolume:
enabled: true
## mongodb-replicaset data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: "do-block-storage"
accessModes:
- ReadWriteOnce
size: 10Gi
parameters:
fsType: xfs
annotations: {}
There are two issues with your custom parameters (values.yaml):
volumeClaimTemplates: - metadata: name: datadir annotations: spec: accessModes: - "ReadWriteOnce" resources: requests: storage: "10Gi" storageClassName: "do-block-storage"
I can see two possible workarounds for your issue:
kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: do-block-storage-xfs namespace: kube-system annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: com.digitalocean.csi.dobs parameters: fstype: xfs