Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (*apis.LVMVolume, error)
- func (b *Builder) WithCapacity(capacity string) *Builder
- func (b *Builder) WithFinalizer(finalizer []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) WithShared(shared string) *Builder
- func (b *Builder) WithThinProvision(thinProvision string) *Builder
- func (b *Builder) WithVgPattern(pattern string) *Builder
- func (b *Builder) WithVolGroup(vg string) *Builder
- func (b *Builder) WithVolumeStatus(status string) *Builder
- type Kubeclient
- func (k *Kubeclient) Create(vol *apis.LVMVolume) (*apis.LVMVolume, error)
- func (k *Kubeclient) Delete(name string) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.LVMVolume, error)
- func (k *Kubeclient) GetRaw(name string, opts metav1.GetOptions) ([]byte, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.LVMVolumeList, error)
- func (k *Kubeclient) Update(vol *apis.LVMVolume) (*apis.LVMVolume, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
- type LVMVolume
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 LVMVolume
func (*Builder) WithCapacity ¶
WithCapacity sets the Capacity of lvm volume by converting string capacity into Quantity
func (*Builder) WithFinalizer ¶
WithFinalizer sets Finalizer name creating the volume
func (*Builder) WithLabels ¶
WithLabels merges existing labels if any with the ones that are provided here
func (*Builder) WithNamespace ¶
WithNamespace sets the namespace of LVMVolume
func (*Builder) WithNodeName ¶
WithNodeName sets NodeID for creating the volume
func (*Builder) WithOwnerNode ¶
WithOwnerNode sets owner node for the LVMVolume where the volume should be provisioned
func (*Builder) WithShared ¶
WithShared sets where filesystem is shared or not
func (*Builder) WithThinProvision ¶ added in v0.4.0
WithThinProvision sets where thinProvision is enable or not
func (*Builder) WithVgPattern ¶ added in v0.5.0
WithVgPattern sets volume group regex pattern.
func (*Builder) WithVolGroup ¶
WithVolGroup sets volume group name for creating volume
func (*Builder) WithVolumeStatus ¶
WithVolumeStatus sets LVMVolume status
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on lvm volume instance
func NewKubeclient ¶
func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeclient returns a new instance of kubeclient meant for lvm volume operations
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string) error
Delete deletes the lvm volume from kubernetes
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get( name string, opts metav1.GetOptions, ) (*apis.LVMVolume, error)
Get returns lvm volume object for given name
func (*Kubeclient) GetRaw ¶
func (k *Kubeclient) GetRaw( name string, opts metav1.GetOptions, ) ([]byte, error)
GetRaw returns lvm volume instance in bytes
func (*Kubeclient) List ¶
func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.LVMVolumeList, error)
List returns a list of lvm 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