hetznercloud / csi-driver

Kubernetes Container Storage Interface driver for Hetzner Cloud Volumes
MIT License
639 stars 103 forks source link

Feature Request: fstype #32

Closed tipruzs closed 5 years ago

tipruzs commented 5 years ago

Is it possible to implement fstype parameter, so we can choose the filesystem (xfs/ext4) during provisioning?

deacix commented 5 years ago

I need it as well! Please implement!

akhfa commented 5 years ago

I just want to know why do you prefer one fstype from the others?

tipruzs commented 5 years ago

There are a many applications which profit from xfs for performance reasons, e.g. mongodb

LKaemmerling commented 5 years ago

This is already possible. You can create a new (custom) storage class with a parameter fsType:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  namespace: kube-system
  name: hcloud-volumes-xfs
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
provisioner: csi.hetzner.cloud
volumeBindingMode: WaitForFirstConsumer
parameters:
  fsType: xfs

And use this storage class in your pvc:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: csi-pvc
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: hcloud-volumes-xfs
deacix commented 5 years ago

Can I also set the location of the storage?

LKaemmerling commented 5 years ago

A volume will be created in the location of the node. You can only attach a volume to a node in the same location.

deacix commented 5 years ago

I couldn't deploy to multiple locations.. Do you maybe have an example for multi location deployment?

LKaemmerling commented 5 years ago

@deacix you can not create a multi-location deployment, because volumes can only be accessed within the location of the node.

deacix commented 5 years ago

But other cloud provider can handle it, why not Hetzner?