Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CheckReplicationAnnotationsForPV(ctx context.Context, object *v1.PersistentVolume) error
- func (c *Client) CheckReplicationAnnotationsForRemotePV(ctx context.Context, object *v1.PersistentVolume) error
- func (c *Client) Delete(ctx context.Context, pv *v1.PersistentVolume) *PersistentVolume
- func (c *Client) DeleteAll(ctx context.Context) error
- func (c *Client) DeleteAllPV(ctx context.Context, ns string, vaClient *va.Client) error
- func (c *Client) Get(ctx context.Context, name string) *PersistentVolume
- func (c *Client) Update(ctx context.Context, pv *v1.PersistentVolume) *PersistentVolume
- func (c *Client) WaitPV(ctx context.Context, newPVName string) error
- type PersistentVolume
Constants ¶
const ( // Poll is a poll interval for PVC tests Poll = 2 * time.Second // Timeout is a timeout interval for PVC operations Timeout = 1800 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // KubeClient *core.KubeClient Interface tcorev1.PersistentVolumeInterface Timeout int }
Client contains pvc interface and kubeclient
func (*Client) CheckReplicationAnnotationsForPV ¶
func (c *Client) CheckReplicationAnnotationsForPV(ctx context.Context, object *v1.PersistentVolume) error
CheckReplicationAnnotationsForPV checks for replication related annotations and labels on PV
func (*Client) CheckReplicationAnnotationsForRemotePV ¶
func (c *Client) CheckReplicationAnnotationsForRemotePV(ctx context.Context, object *v1.PersistentVolume) error
CheckReplicationAnnotationsForRemotePV checks for replication related annotations and labels for remote PV
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, pv *v1.PersistentVolume) *PersistentVolume
Delete deletes PersistentVolumeClaim from Kubernetes
func (*Client) DeleteAllPV ¶
DeleteAllPV deletes all pvs in timely manner on the basis of namespace
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, name string) *PersistentVolume
Get uses client interface to make API call for getting provided PersistentVolume
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, pv *v1.PersistentVolume) *PersistentVolume
Update updates a PersistentVolume
type PersistentVolume ¶
type PersistentVolume struct { Client *Client Object *v1.PersistentVolume Deleted bool // contains filtered or unexported fields }
PersistentVolume conatins pv client and claim
func (*PersistentVolume) GetError ¶
func (pv *PersistentVolume) GetError() error
GetError returns PV error
func (*PersistentVolume) HasError ¶
func (pv *PersistentVolume) HasError() bool
HasError checks if PV contains error
func (*PersistentVolume) Sync ¶
func (pv *PersistentVolume) Sync(ctx context.Context) *PersistentVolume
Sync waits until PV is deleted or bound
func (*PersistentVolume) WaitToBeBound ¶
func (pv *PersistentVolume) WaitToBeBound(ctx context.Context) error
WaitToBeBound waits for PVC to be in Bound state
func (*PersistentVolume) WaitUntilGone ¶
func (pv *PersistentVolume) WaitUntilGone(ctx context.Context) error
WaitUntilGone stalls until said Pod no longer can be found in Kubernetes