Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (*apis.ZFSVolume, error)
- func (b *Builder) WithCapacity(capacity string) *Builder
- func (b *Builder) WithCompression(compression string) *Builder
- func (b *Builder) WithDedup(dedup string) *Builder
- func (b *Builder) WithEncryption(encr string) *Builder
- func (b *Builder) WithFinalizer(finalizer []string) *Builder
- func (b *Builder) WithFsType(fstype string) *Builder
- func (b *Builder) WithKeyFormat(kf string) *Builder
- func (b *Builder) WithKeyLocation(kl string) *Builder
- func (b *Builder) WithLabels(labels map[string]string) *Builder
- func (b *Builder) WithName(name string) *Builder
- func (b *Builder) WithNamespace(namespace string) *Builder
- func (b *Builder) WithNodeName(name string) *Builder
- func (b *Builder) WithOwnerNode(host string) *Builder
- func (b *Builder) WithPoolName(pool string) *Builder
- func (b *Builder) WithRecordSize(rs string) *Builder
- func (b *Builder) WithSnapshot(snap string) *Builder
- func (b *Builder) WithThinProv(thinprov string) *Builder
- func (b *Builder) WithVolBlockSize(bs string) *Builder
- func (b *Builder) WithVolumeStatus(status string) *Builder
- func (b *Builder) WithVolumeType(vtype string) *Builder
- type Kubeclient
- func (k *Kubeclient) Create(vol *apis.ZFSVolume) (*apis.ZFSVolume, error)
- func (k *Kubeclient) Delete(name string) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.ZFSVolume, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.ZFSVolumeList, error)
- func (k *Kubeclient) Update(vol *apis.ZFSVolume) (*apis.ZFSVolume, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
- type ListBuilder
- type Predicate
- type ZFSVolume
- type ZFSVolumeList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is the builder object for ZFSVolume
func (*Builder) WithCapacity ¶
WithCapacity sets the Capacity of zfs volume by converting string capacity into Quantity
func (*Builder) WithCompression ¶
WithCompression sets compression of ZFSVolume
func (*Builder) WithEncryption ¶
WithEncryption sets the encryption on ZFSVolume
func (*Builder) WithFinalizer ¶
WithFinalizer sets Finalizer name creating the volume
func (*Builder) WithFsType ¶
WithFsType sets filesystem for the ZFSVolume
func (*Builder) WithKeyFormat ¶
WithKeyFormat sets the encryption key format on ZFSVolume
func (*Builder) WithKeyLocation ¶
WithKeyLocation sets the encryption key location on ZFSVolume
func (*Builder) WithLabels ¶
WithLabels merges existing labels if any with the ones that are provided here
func (*Builder) WithNamespace ¶
WithNamespace sets the namespace of ZFSVolume
func (*Builder) WithNodeName ¶ added in v0.8.0
WithNodeName sets NodeID for creating the volume
func (*Builder) WithOwnerNode ¶
WithOwnerNode sets owner node for the ZFSVolume where the volume should be provisioned
func (*Builder) WithPoolName ¶
WithPoolName sets Pool name for creating volume
func (*Builder) WithRecordSize ¶
WithRecordSize sets the recordsize of ZFSVolume
func (*Builder) WithSnapshot ¶
WithSnapshot sets Snapshot name for creating clone volume
func (*Builder) WithThinProv ¶
WithThinProv sets if ZFSVolume needs to be thin provisioned
func (*Builder) WithVolBlockSize ¶
WithVolBlockSize sets the volblocksize of ZFSVolume
func (*Builder) WithVolumeStatus ¶ added in v0.8.0
WithVolumeStatus sets ZFSVolume status
func (*Builder) WithVolumeType ¶
WithVolumeType sets if ZFSVolume needs to be thin provisioned
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on zfs volume instance
func NewKubeclient ¶
func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeclient returns a new instance of kubeclient meant for zfs volume operations
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string) error
Delete deletes the zfs volume from kubernetes
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get( name string, opts metav1.GetOptions, ) (*apis.ZFSVolume, error)
Get returns zfs volume object for given name
func (*Kubeclient) GetRaw ¶
func (k *Kubeclient) GetRaw( name string, opts metav1.GetOptions, ) ([]byte, error)
GetRaw returns zfs volume instance in bytes
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.ZFSVolumeList, error)
List returns a list of zfs volume instances present in kubernetes cluster
func (*Kubeclient) WithNamespace ¶
func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
WithNamespace sets the provided namespace against this Kubeclient instance
type KubeclientBuildOption ¶
type KubeclientBuildOption func(*Kubeclient)
KubeclientBuildOption defines the abstraction to build a kubeclient instance
func WithClientSet ¶
func WithClientSet(c *clientset.Clientset) KubeclientBuildOption
WithClientSet sets the kubernetes client against the kubeclient instance
func WithKubeConfigPath ¶
func WithKubeConfigPath(path string) KubeclientBuildOption
WithKubeConfigPath sets the kubernetes client against the provided path
func WithNamespace ¶
func WithNamespace(namespace string) KubeclientBuildOption
WithNamespace sets the kubernetes client against the provided namespace
type ListBuilder ¶
type ListBuilder struct {
// contains filtered or unexported fields
}
ListBuilder enables building an instance of ZFSVolumeList
func ListBuilderFrom ¶
func ListBuilderFrom(vols apis.ZFSVolumeList) *ListBuilder
ListBuilderFrom returns a new instance of ListBuilder from API list instance
func NewListBuilder ¶
func NewListBuilder() *ListBuilder
NewListBuilder returns a new instance of ListBuilder
func (*ListBuilder) List ¶
func (b *ListBuilder) List() *apis.ZFSVolumeList
List returns the list of pod instances that was built by this builder
func (*ListBuilder) WithFilter ¶
func (b *ListBuilder) WithFilter(pred ...Predicate) *ListBuilder
WithFilter add filters on which the pod has to be filtered
type Predicate ¶
Predicate defines an abstraction to determine conditional checks against the provided pod instance
func HasLabel ¶
HasLabel returns true if provided label is present in the provided ZFSVolume instance
type ZFSVolume ¶
ZFSVolume is a wrapper over ZFSVolume API instance
func (*ZFSVolume) GetAPIObject ¶
GetAPIObject returns zfs volume's API instance
type ZFSVolumeList ¶
type ZFSVolumeList struct { // List conatils list of volumes List apis.ZFSVolumeList }
ZFSVolumeList holds the list of zfs volume instances
func (*ZFSVolumeList) Len ¶
func (volList *ZFSVolumeList) Len() int
Len returns the number of items present in the ZFSVolumeList