Documentation ¶
Index ¶
Constants ¶
View Source
const ( ParentDatasetParameter = "parentDataset" HostnameParameter = "hostname" TypeParameter = "type" NodeNameParameter = "node" ReserveSpaceParameter = "reserveSpace" )
View Source
const ( DatasetPathAnnotation = "zfs.pv.kubernetes.io/zfs-dataset-path" ZFSHostAnnotation = "zfs.pv.kubernetes.io/zfs-host" RefQuotaProperty = "refquota" RefReservationProperty = "refreservation" ManagedByProperty = "io.kubernetes.pv.zfs:managed_by" ReclaimPolicyProperty = "io.kubernetes.pv.zfs:reclaim_policy" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostPathParameters ¶
type HostPathParameters struct { // NodeName overrides the hostname if the Kubernetes node name is different than the ZFS target host. Used for Affinity NodeName string }
type NFSParameters ¶
type NFSParameters struct { string }ShareProperties
type ZFSProvisioner ¶
type ZFSProvisioner struct { InstanceName string // contains filtered or unexported fields }
ZFSProvisioner implements the Provisioner interface to create and export ZFS volumes
func NewZFSProvisioner ¶
func NewZFSProvisioner(instanceName string) (*ZFSProvisioner, error)
NewZFSProvisioner returns a new ZFSProvisioner based on a given optional zap.Logger. If none given, zaps default production logger is used.
func (*ZFSProvisioner) Delete ¶
func (p *ZFSProvisioner) Delete(ctx context.Context, volume *core.PersistentVolume) error
Delete removes a given volume from the server
func (*ZFSProvisioner) Provision ¶
func (p *ZFSProvisioner) Provision(ctx context.Context, options controller.ProvisionOptions) (*v1.PersistentVolume, controller.ProvisioningState, error)
Provision creates a PersistentVolume, sets quota and shares it via NFS.
type ZFSStorageClassParameters ¶
type ZFSStorageClassParameters struct { // ParentDataset of the zpool. Needs to be existing on the target ZFS host. ParentDataset string // Hostname of the target ZFS host. Will be used to connect over SSH. Hostname string NFS *NFSParameters HostPath *HostPathParameters ReserveSpace bool }
ZFSStorageClassParameters represents the parameters on the `StorageClass` object. It is used to ease access and validate those parameters at run time.
func NewStorageClassParameters ¶
func NewStorageClassParameters(parameters map[string]string) (*ZFSStorageClassParameters, error)
NewStorageClassParameters takes a storage class parameters, validates it for invalid configuration and returns a ZFSStorageClassParameters on success.
Click to show internal directories.
Click to hide internal directories.