-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, the ovirt-csi-driver storage domain is specified in the StorageClass. There is no way that a StoageClass can use multiple storage domains.
For example:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: oblock
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: csi.ovirt.org
parameters:
# the name of the oVirt storage domain. "oblock" is just an example.
storageDomainName: oblock
thinProvisioning: "true"
fsType: ext4
Proposed change
As shown previously, the OLVM storage domain is specified by the. storageDomainName field. There is a requirement to allow storage domains to be selected using OLVM disk profiles. In OLVM, multiple storage domains can use the same disk profile. The driver would query OLVM and get the storage domains associated with the specified disk profile, then select a storage domain based on a policy. The current storageDomainName field will still be supported.
Add two additional fields:
diskProfileName: .
&&storageDomainSelectionPolicy**: <selection-policy (default is LeastUsed)>
The initial selection policy will be "LeastUsed", which will select the storage domain that has both most space and also the space needed for the storage allocation request.
New StorageClass parameters
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: oblock
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: csi.ovirt.org
parameters:
# the name of the OLVM disk profile. Default storageDomainSelectionPolicy is used.
diskProfileName: myDiskProfile
storageDomainSelectionPolicy: LeastUsed
thinProvisioning: "true"
fsType: ext4