Documentation ¶
Index ¶
- Constants
- func GetCVRList(pvName, namespace string) (*apis.CStorVolumeReplicaList, error)
- func GetPoolNames(cvrList *apis.CStorVolumeReplicaList) []string
- func GetVolumeReplicaPoolNames(pvName, namespace string) ([]string, error)
- type Builder
- func (b *Builder) Build() (*apis.CStorVolumeReplica, error)
- func (b *Builder) WithAnnotations(annotations map[string]string) *Builder
- func (b *Builder) WithAnnotationsNew(annotations map[string]string) *Builder
- func (b *Builder) WithCapacity(capacity string) *Builder
- func (b *Builder) WithDependentsUpgraded() *Builder
- func (b *Builder) WithFinalizers(finalizers []string) *Builder
- func (b *Builder) WithFinalizersNew(finalizers []string) *Builder
- func (b *Builder) WithGenerateName(name string) *Builder
- func (b *Builder) WithLabels(labels map[string]string) *Builder
- func (b *Builder) WithLabelsNew(labels map[string]string) *Builder
- func (b *Builder) WithName(name string) *Builder
- func (b *Builder) WithNamespace(namespace string) *Builder
- func (b *Builder) WithNewVersion(version string) *Builder
- func (b *Builder) WithOwnerRefernceNew(ownerRefernce []metav1.OwnerReference) *Builder
- func (b *Builder) WithReplicaID(replicaID string) *Builder
- func (b *Builder) WithStatusPhase(phase apis.CStorVolumeReplicaPhase) *Builder
- func (b *Builder) WithTargetIP(targetip string) *Builder
- type CVR
- type CVRList
- type Kubeclient
- func (k *Kubeclient) Create(volr *apis.CStorVolumeReplica) (*apis.CStorVolumeReplica, error)
- func (k *Kubeclient) Delete(name string) error
- func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.CStorVolumeReplica, error)
- func (k *Kubeclient) List(opts metav1.ListOptions) (*apis.CStorVolumeReplicaList, error)
- func (k *Kubeclient) Patch(name, namespace string, pt types.PatchType, data []byte) (*apis.CStorVolumeReplica, error)
- func (k *Kubeclient) Update(volr *apis.CStorVolumeReplica) (*apis.CStorVolumeReplica, error)
- func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
- type KubeclientBuildOption
- type ListBuilder
- type Predicate
- type PredicateList
Constants ¶
const (
// CStorVolumeReplicaFinalizer is the name of finalizer on CStorVolumeClaim
CStorVolumeReplicaFinalizer = "cstorvolumereplica.openebs.io/finalizer"
)
Variables ¶
This section is empty.
Functions ¶
func GetCVRList ¶
func GetCVRList(pvName, namespace string) (*apis.CStorVolumeReplicaList, error)
GetCVRList returns list of volume replicas related to provided volume
func GetPoolNames ¶
func GetPoolNames(cvrList *apis.CStorVolumeReplicaList) []string
GetPoolNames returns list of pool names from cStor volume replcia list
func GetVolumeReplicaPoolNames ¶
GetVolumeReplicaPoolNames return list of replicas pool names by taking pvName and namespace(where pool is installed) as a input and return error(if any error occured)
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is the builder object for CStorVolume
func (*Builder) Build ¶
func (b *Builder) Build() (*apis.CStorVolumeReplica, error)
Build returns the CStorVolumeReplica API instance
func (*Builder) WithAnnotations ¶
WithAnnotations merges existing annotations if any with the ones that are provided here
func (*Builder) WithAnnotationsNew ¶
WithAnnotationsNew resets existing annotations if any with ones that are provided here
func (*Builder) WithCapacity ¶
WithCapacity sets the Capacity field of CStorVolumeReplica with provided arguments
func (*Builder) WithDependentsUpgraded ¶
WithDependentsUpgraded sets the field to true for new volume
func (*Builder) WithFinalizers ¶
WithFinalizers merges the existing finalizers if any with the ones provided arguments
func (*Builder) WithFinalizersNew ¶
WithFinalizersNew resets any existing finalizers and overrides them with provided arguments
func (*Builder) WithGenerateName ¶
WithGenerateName sets the GenerateName field of CStorVolumeReplica with provided value
func (*Builder) WithLabels ¶
WithLabels merges existing labels if any with the ones that are provided here
func (*Builder) WithLabelsNew ¶
WithLabelsNew resets existing labels if any with ones that are provided here
func (*Builder) WithNamespace ¶
WithNamespace sets the Namespace field of CStorVolumeReplica provided arguments
func (*Builder) WithNewVersion ¶
WithNewVersion sets the current and desired version field of CStorVolumeReplica with provided arguments
func (*Builder) WithOwnerRefernceNew ¶
func (b *Builder) WithOwnerRefernceNew(ownerRefernce []metav1.OwnerReference) *Builder
WithOwnerRefernceNew sets ownerrefernce if any with ones that are provided here
func (*Builder) WithReplicaID ¶
WithReplicaID sets the replicaID with the provided argumentsu
func (*Builder) WithStatusPhase ¶
func (b *Builder) WithStatusPhase(phase apis.CStorVolumeReplicaPhase) *Builder
WithStatusPhase sets the Status Phase of CStorVolumeReplica with provided arguments
func (*Builder) WithTargetIP ¶
WithTargetIP sets the target IP address field of CStorVolumeReplica with provided arguments
type CVR ¶
type CVR struct {
// contains filtered or unexported fields
}
CVR is a wrapper for cstorvolume replica object
type CVRList ¶
type CVRList struct {
// contains filtered or unexported fields
}
CVRList is a list of cstorvolume replica objects
func (*CVRList) GetPoolNames ¶
GetPoolNames returns a list of cstor pool name corresponding to cstor volume replica instances
func (*CVRList) GetPoolUIDs ¶
GetPoolUIDs returns a list of cstor pool UIDs corresponding to cstor volume replica instances
func (*CVRList) GetUniquePoolNames ¶
GetUniquePoolNames returns a list of cstor pool name corresponding to cstor volume replica instances
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
Kubeclient enables kubernetes API operations on cstor volume replica instance
func NewKubeclient ¶
func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient
NewKubeclient returns a new instance of kubeclient meant for cstor volume replica operations
func (*Kubeclient) Create ¶
func (k *Kubeclient) Create( volr *apis.CStorVolumeReplica, ) (*apis.CStorVolumeReplica, error)
Create creates cstorvolumereplica resource for given object
func (*Kubeclient) Delete ¶
func (k *Kubeclient) Delete(name string) error
Delete delete the cstorvolume replica resource
func (*Kubeclient) Get ¶
func (k *Kubeclient) Get( name string, opts metav1.GetOptions, ) (*apis.CStorVolumeReplica, error)
Get returns cstorvolumereplica object for given name
func (*Kubeclient) List ¶
func (k *Kubeclient) List( opts metav1.ListOptions, ) (*apis.CStorVolumeReplicaList, error)
List returns a list of cstor volume replica instances present in kubernetes cluster
func (*Kubeclient) Patch ¶
func (k *Kubeclient) Patch( name, namespace string, pt types.PatchType, data []byte, ) (*apis.CStorVolumeReplica, error)
Patch patches the cstorvolume replica resource
func (*Kubeclient) Update ¶
func (k *Kubeclient) Update( volr *apis.CStorVolumeReplica, ) (*apis.CStorVolumeReplica, error)
Update updates cstorvolumereplica resource for given object
func (*Kubeclient) WithNamespace ¶
func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient
WithNamespace sets the kubernetes client against the provided namespace
type KubeclientBuildOption ¶
type KubeclientBuildOption func(*Kubeclient)
KubeclientBuildOption defines the abstraction to build a kubeclient instance
func WithKubeClient ¶
func WithKubeClient(c *clientset.Clientset) KubeclientBuildOption
WithKubeClient 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 CVRList
func NewListBuilder ¶
func NewListBuilder() *ListBuilder
NewListBuilder returns a new instance of ListBuilder
func (*ListBuilder) AppendListBuilder ¶
func (b *ListBuilder) AppendListBuilder( cvr *apis.CStorVolumeReplica) *ListBuilder
AppendListBuilder append the provided CVR API object into existing ListBuilder
func (*ListBuilder) List ¶
func (b *ListBuilder) List() *CVRList
List returns the list of cvr instances that was built by this builder
func (*ListBuilder) WithAPIList ¶
func (b *ListBuilder) WithAPIList( list *apis.CStorVolumeReplicaList, ) *ListBuilder
WithAPIList builds the list of cvr instances based on the provided cvr api instances
func (*ListBuilder) WithFilter ¶
func (b *ListBuilder) WithFilter(pred ...Predicate) *ListBuilder
WithFilter adds filters on which the cvr's has to be filtered
type Predicate ¶
Predicate defines an abstraction to determine conditional checks against the provided cvr instance