Documentation
¶
Index ¶
- Variables
- func DriveClient() types.LatestDriveInterface
- func Eventf(object runtime.Object, eventType EventType, reason EventReason, ...)
- func FakeInit()
- func Init()
- func InitRequestClient() types.LatestInitRequestInterface
- func NodeClient() types.LatestNodeInterface
- func RESTClient() rest.Interface
- func SetDriveInterface(i types.LatestDriveInterface)
- func SetInitRequestInterface(i types.LatestInitRequestInterface)
- func SetNodeInterface(i types.LatestNodeInterface)
- func SetVolumeInterface(i types.LatestVolumeInterface)
- func VolumeClient() types.LatestVolumeInterface
- type Client
- func (c Client) APIextensions() apiextensions.ApiextensionsV1Interface
- func (c Client) CRD() apiextensions.CustomResourceDefinitionInterface
- func (c Client) Discovery() discovery.DiscoveryInterface
- func (c Client) Drive() types.LatestDriveInterface
- func (c Client) InitRequest() types.LatestInitRequestInterface
- func (c Client) K8s() *k8s.Client
- func (c Client) Kube() kubernetes.Interface
- func (c Client) KubeConfig() *rest.Config
- func (client Client) NewDriveLister() *DriveLister
- func (client Client) NewInitRequestLister() *InitRequestLister
- func (client Client) NewNodeLister() *NodeLister
- func (client Client) NewVolumeLister() *VolumeLister
- func (c Client) Node() types.LatestNodeInterface
- func (c Client) REST() rest.Interface
- func (c Client) SyncNodes(ctx context.Context) (err error)
- func (c Client) Volume() types.LatestVolumeInterface
- type DriveLister
- func (lister *DriveLister) DriveIDSelector(driveIDs []directpvtypes.DriveID) *DriveLister
- func (lister *DriveLister) DriveNameSelector(driveNames []directpvtypes.LabelValue) *DriveLister
- func (lister *DriveLister) Get(ctx context.Context) ([]types.Drive, error)
- func (lister *DriveLister) IgnoreNotFound(b bool) *DriveLister
- func (lister *DriveLister) LabelSelector(labels map[directpvtypes.LabelKey]directpvtypes.LabelValue) *DriveLister
- func (lister *DriveLister) List(ctx context.Context) <-chan ListDriveResult
- func (lister *DriveLister) MaxObjects(n int64) *DriveLister
- func (lister *DriveLister) NodeSelector(nodes []directpvtypes.LabelValue) *DriveLister
- func (lister *DriveLister) StatusSelector(statusList []directpvtypes.DriveStatus) *DriveLister
- type EventReason
- type EventType
- type InitRequestLister
- func (lister *InitRequestLister) Get(ctx context.Context) ([]types.InitRequest, error)
- func (lister *InitRequestLister) IgnoreNotFound(b bool) *InitRequestLister
- func (lister *InitRequestLister) InitRequestNameSelector(initRequestNames []string) *InitRequestLister
- func (lister *InitRequestLister) List(ctx context.Context) <-chan ListInitRequestResult
- func (lister *InitRequestLister) MaxObjects(n int64) *InitRequestLister
- func (lister *InitRequestLister) NodeSelector(nodes []directpvtypes.LabelValue) *InitRequestLister
- func (lister *InitRequestLister) RequestIDSelector(requestIDs []directpvtypes.LabelValue) *InitRequestLister
- func (lister *InitRequestLister) Watch(ctx context.Context) (<-chan WatchEvent[*types.InitRequest], func(), error)
- type ListDriveResult
- type ListInitRequestResult
- type ListNodeResult
- type ListVolumeResult
- type NodeLister
- func (lister *NodeLister) Get(ctx context.Context) ([]types.Node, error)
- func (lister *NodeLister) IgnoreNotFound(b bool) *NodeLister
- func (lister *NodeLister) List(ctx context.Context) <-chan ListNodeResult
- func (lister *NodeLister) MaxObjects(n int64) *NodeLister
- func (lister *NodeLister) NodeNameSelector(nodeNames []string) *NodeLister
- func (lister *NodeLister) NodeSelector(nodes []directpvtypes.LabelValue) *NodeLister
- func (lister *NodeLister) Watch(ctx context.Context) (<-chan WatchEvent[*types.Node], func(), error)
- type VolumeLister
- func (lister *VolumeLister) DriveIDSelector(driveIDs []directpvtypes.LabelValue) *VolumeLister
- func (lister *VolumeLister) DriveNameSelector(driveNames []directpvtypes.LabelValue) *VolumeLister
- func (lister *VolumeLister) Get(ctx context.Context) ([]types.Volume, error)
- func (lister *VolumeLister) IgnoreNotFound(b bool) *VolumeLister
- func (lister *VolumeLister) LabelSelector(labels map[directpvtypes.LabelKey]directpvtypes.LabelValue) *VolumeLister
- func (lister *VolumeLister) List(ctx context.Context) <-chan ListVolumeResult
- func (lister *VolumeLister) MaxObjects(n int64) *VolumeLister
- func (lister *VolumeLister) NodeSelector(nodes []directpvtypes.LabelValue) *VolumeLister
- func (lister *VolumeLister) PodNSSelector(podNSs []directpvtypes.LabelValue) *VolumeLister
- func (lister *VolumeLister) PodNameSelector(podNames []directpvtypes.LabelValue) *VolumeLister
- func (lister *VolumeLister) StatusSelector(statusList []directpvtypes.VolumeStatus) *VolumeLister
- func (lister *VolumeLister) VolumeNameSelector(volumeNames []string) *VolumeLister
- type WatchEvent
Constants ¶
This section is empty.
Variables ¶
var AddToScheme = localSchemeBuilder.AddToScheme
AddToScheme adds all types of this clientset into the given scheme. This allows composition of clientsets, like in:
import ( "k8s.io/client-go/kubernetes" clientsetscheme "k8s.io/client-go/kubernetes/scheme" aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" ) kclientset, _ := kubernetes.NewForConfig(c) _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
After this, RawExtensions in Kubernetes types will serialize kube-aggregator types correctly.
var Codecs = serializer.NewCodecFactory(Scheme)
Codecs is new codec of new runtime scheme.
var ParameterCodec = runtime.NewParameterCodec(Scheme)
ParameterCodec is new parameter codec of new runtime scheme.
var Scheme = runtime.NewScheme()
Scheme is new runtime scheme.
Functions ¶
func DriveClient ¶
func DriveClient() types.LatestDriveInterface
DriveClient gets latest versioned drive interface.
func Eventf ¶
func Eventf(object runtime.Object, eventType EventType, reason EventReason, messageFmt string, args ...interface{})
Eventf raises kubernetes events.
func InitRequestClient ¶
func InitRequestClient() types.LatestInitRequestInterface
InitRequestClient gets latest versioned init request interface.
func NodeClient ¶
func NodeClient() types.LatestNodeInterface
NodeClient gets latest versioned node interface.
func SetDriveInterface ¶
func SetDriveInterface(i types.LatestDriveInterface)
SetDriveInterface sets latest drive interface. Note: To be used for writing test cases only
func SetInitRequestInterface ¶
func SetInitRequestInterface(i types.LatestInitRequestInterface)
SetInitRequestInterface sets latest initrequest interface. Note: To be used for writing test cases only
func SetNodeInterface ¶
func SetNodeInterface(i types.LatestNodeInterface)
SetNodeInterface sets latest node interface. Note: To be used for writing test cases only
func SetVolumeInterface ¶
func SetVolumeInterface(i types.LatestVolumeInterface)
SetVolumeInterface sets the latest volume interface. Note: To be used for writing test cases only
func VolumeClient ¶
func VolumeClient() types.LatestVolumeInterface
VolumeClient gets latest versioned volume interface.
Types ¶
type Client ¶
type Client struct {
ClientsetInterface types.ExtClientsetInterface
RESTClient rest.Interface
DriveClient types.LatestDriveInterface
VolumeClient types.LatestVolumeInterface
NodeClient types.LatestNodeInterface
InitRequestClient types.LatestInitRequestInterface
K8sClient *k8s.Client
}
Client represents the directpv client set
func (Client) APIextensions ¶
func (c Client) APIextensions() apiextensions.ApiextensionsV1Interface
APIextensions returns the APIextensionsClient
func (Client) CRD ¶
func (c Client) CRD() apiextensions.CustomResourceDefinitionInterface
CRD returns the CRD client
func (Client) Discovery ¶
func (c Client) Discovery() discovery.DiscoveryInterface
Discovery returns the discovery client
func (Client) Drive ¶
func (c Client) Drive() types.LatestDriveInterface
Drive returns the DirectPV Drive interface
func (Client) InitRequest ¶
func (c Client) InitRequest() types.LatestInitRequestInterface
InitRequest returns the DirectPV InitRequest interface
func (Client) KubeConfig ¶
KubeConfig returns the kubeconfig
func (Client) NewDriveLister ¶
func (client Client) NewDriveLister() *DriveLister
NewDriveLister creates new drive lister.
func (Client) NewInitRequestLister ¶
func (client Client) NewInitRequestLister() *InitRequestLister
NewInitRequestLister creates new volume lister.
func (Client) NewNodeLister ¶
func (client Client) NewNodeLister() *NodeLister
NewNodeLister creates new volume lister.
func (Client) NewVolumeLister ¶
func (client Client) NewVolumeLister() *VolumeLister
NewVolumeLister creates new volume lister.
func (Client) Node ¶
func (c Client) Node() types.LatestNodeInterface
Node returns the DirectPV Node interface
func (Client) SyncNodes ¶
SyncNodes compares the csinodes with directpvnode list and syncs them It adds the missing nodes and deletes the non-existing nodes
func (Client) Volume ¶
func (c Client) Volume() types.LatestVolumeInterface
Volume returns the DirectPV Volume interface
type DriveLister ¶
type DriveLister struct {
// contains filtered or unexported fields
}
DriveLister is lister wrapper for DirectPVDrive listing.
func NewDriveLister ¶
func NewDriveLister() *DriveLister
NewDriveLister returns the new drive lister
func (*DriveLister) DriveIDSelector ¶
func (lister *DriveLister) DriveIDSelector(driveIDs []directpvtypes.DriveID) *DriveLister
DriveIDSelector adds filter listing by drive IDs.
func (*DriveLister) DriveNameSelector ¶
func (lister *DriveLister) DriveNameSelector(driveNames []directpvtypes.LabelValue) *DriveLister
DriveNameSelector adds filter listing by drive names.
func (*DriveLister) IgnoreNotFound ¶
func (lister *DriveLister) IgnoreNotFound(b bool) *DriveLister
IgnoreNotFound controls listing to ignore drive not found error.
func (*DriveLister) LabelSelector ¶
func (lister *DriveLister) LabelSelector(labels map[directpvtypes.LabelKey]directpvtypes.LabelValue) *DriveLister
LabelSelector adds filter listing by labels.
func (*DriveLister) List ¶
func (lister *DriveLister) List(ctx context.Context) <-chan ListDriveResult
List returns channel to loop through drive items.
func (*DriveLister) MaxObjects ¶
func (lister *DriveLister) MaxObjects(n int64) *DriveLister
MaxObjects controls number of items to be fetched in every iteration.
func (*DriveLister) NodeSelector ¶
func (lister *DriveLister) NodeSelector(nodes []directpvtypes.LabelValue) *DriveLister
NodeSelector adds filter listing by nodes.
func (*DriveLister) StatusSelector ¶
func (lister *DriveLister) StatusSelector(statusList []directpvtypes.DriveStatus) *DriveLister
StatusSelector adds filter listing by drive status.
type EventReason ¶
type EventReason string
EventReason denotes kubernetes event reason.
const ( EventReasonStageVolume EventReason = "StageVolume" EventReasonVolumeMoved EventReason = "VolumeMoved" EventReasonMetrics EventReason = "Metrics" EventReasonVolumeProvisioned EventReason = "VolumeProvisioned" EventReasonVolumeAdded EventReason = "VolumeAdded" EventReasonVolumeExpanded EventReason = "VolumeExpanded" EventReasonVolumeReleased EventReason = "VolumeReleased" EventReasonDriveMountError EventReason = "DriveHasMountError" EventReasonDriveMounted EventReason = "DriveMounted" EventReasonDriveHasMultipleMatches EventReason = "DriveHasMultipleMatches" EventReasonDriveIOError EventReason = "DriveHasIOError" EventReasonDriveRelabelError EventReason = "DriveHasRelabelError" EventReasonInitError EventReason = "InitError" EventReasonDeviceNotFoundError EventReason = "DeviceNotFoundError" )
Enum values of EventReason type.
type EventType ¶
type EventType string
EventType denotes kubernetes event type.
const ( EventTypeNormal EventType = EventType(apicorev1.EventTypeNormal) EventTypeWarning EventType = EventType(apicorev1.EventTypeWarning) )
Enum values of EventType type.
type InitRequestLister ¶
type InitRequestLister struct {
// contains filtered or unexported fields
}
InitRequestLister is initRequest lister.
func NewInitRequestLister ¶
func NewInitRequestLister() *InitRequestLister
NewInitRequestLister returns the new initrequest lister
func (*InitRequestLister) Get ¶
func (lister *InitRequestLister) Get(ctx context.Context) ([]types.InitRequest, error)
Get returns list of initrequest.
func (*InitRequestLister) IgnoreNotFound ¶
func (lister *InitRequestLister) IgnoreNotFound(b bool) *InitRequestLister
IgnoreNotFound controls listing to ignore not found error.
func (*InitRequestLister) InitRequestNameSelector ¶
func (lister *InitRequestLister) InitRequestNameSelector(initRequestNames []string) *InitRequestLister
InitRequestNameSelector adds filter listing by InitRequestNames.
func (*InitRequestLister) List ¶
func (lister *InitRequestLister) List(ctx context.Context) <-chan ListInitRequestResult
List returns channel to loop through initrequest items.
func (*InitRequestLister) MaxObjects ¶
func (lister *InitRequestLister) MaxObjects(n int64) *InitRequestLister
MaxObjects controls number of items to be fetched in every iteration.
func (*InitRequestLister) NodeSelector ¶
func (lister *InitRequestLister) NodeSelector(nodes []directpvtypes.LabelValue) *InitRequestLister
NodeSelector adds filter listing by nodes.
func (*InitRequestLister) RequestIDSelector ¶
func (lister *InitRequestLister) RequestIDSelector(requestIDs []directpvtypes.LabelValue) *InitRequestLister
RequestIDSelector adds filter listing by its request IDs.
func (*InitRequestLister) Watch ¶
func (lister *InitRequestLister) Watch(ctx context.Context) (<-chan WatchEvent[*types.InitRequest], func(), error)
Watch looks for changes in InitRequestList and reports them.
type ListDriveResult ¶
ListDriveResult denotes list of drive result.
type ListInitRequestResult ¶
type ListInitRequestResult struct {
InitRequest types.InitRequest
Err error
}
ListInitRequestResult denotes list of initrequest result.
type ListNodeResult ¶
ListNodeResult denotes list of node result.
type ListVolumeResult ¶
ListVolumeResult denotes list of volume result.
type NodeLister ¶
type NodeLister struct {
// contains filtered or unexported fields
}
NodeLister is node lister.
func (*NodeLister) IgnoreNotFound ¶
func (lister *NodeLister) IgnoreNotFound(b bool) *NodeLister
IgnoreNotFound controls listing to ignore node not found error.
func (*NodeLister) List ¶
func (lister *NodeLister) List(ctx context.Context) <-chan ListNodeResult
List returns channel to loop through node items.
func (*NodeLister) MaxObjects ¶
func (lister *NodeLister) MaxObjects(n int64) *NodeLister
MaxObjects controls number of items to be fetched in every iteration.
func (*NodeLister) NodeNameSelector ¶
func (lister *NodeLister) NodeNameSelector(nodeNames []string) *NodeLister
NodeNameSelector adds filter listing by node names.
func (*NodeLister) NodeSelector ¶
func (lister *NodeLister) NodeSelector(nodes []directpvtypes.LabelValue) *NodeLister
NodeSelector adds filter listing by nodes.
func (*NodeLister) Watch ¶
func (lister *NodeLister) Watch(ctx context.Context) (<-chan WatchEvent[*types.Node], func(), error)
Watch looks for changes in NodeList and reports them.
type VolumeLister ¶
type VolumeLister struct {
// contains filtered or unexported fields
}
VolumeLister is volume lister.
func NewVolumeLister ¶
func NewVolumeLister() *VolumeLister
NewVolumeLister returns the new volume lister
func (*VolumeLister) DriveIDSelector ¶
func (lister *VolumeLister) DriveIDSelector(driveIDs []directpvtypes.LabelValue) *VolumeLister
DriveIDSelector adds filter listing by drive IDs.
func (*VolumeLister) DriveNameSelector ¶
func (lister *VolumeLister) DriveNameSelector(driveNames []directpvtypes.LabelValue) *VolumeLister
DriveNameSelector adds filter listing by drive names.
func (*VolumeLister) IgnoreNotFound ¶
func (lister *VolumeLister) IgnoreNotFound(b bool) *VolumeLister
IgnoreNotFound controls listing to ignore drive not found error.
func (*VolumeLister) LabelSelector ¶
func (lister *VolumeLister) LabelSelector(labels map[directpvtypes.LabelKey]directpvtypes.LabelValue) *VolumeLister
LabelSelector adds filter listing by labels.
func (*VolumeLister) List ¶
func (lister *VolumeLister) List(ctx context.Context) <-chan ListVolumeResult
List returns channel to loop through volume items.
func (*VolumeLister) MaxObjects ¶
func (lister *VolumeLister) MaxObjects(n int64) *VolumeLister
MaxObjects controls number of items to be fetched in every iteration.
func (*VolumeLister) NodeSelector ¶
func (lister *VolumeLister) NodeSelector(nodes []directpvtypes.LabelValue) *VolumeLister
NodeSelector adds filter listing by nodes.
func (*VolumeLister) PodNSSelector ¶
func (lister *VolumeLister) PodNSSelector(podNSs []directpvtypes.LabelValue) *VolumeLister
PodNSSelector adds filter listing by pod namespaces.
func (*VolumeLister) PodNameSelector ¶
func (lister *VolumeLister) PodNameSelector(podNames []directpvtypes.LabelValue) *VolumeLister
PodNameSelector adds filter listing by pod names.
func (*VolumeLister) StatusSelector ¶
func (lister *VolumeLister) StatusSelector(statusList []directpvtypes.VolumeStatus) *VolumeLister
StatusSelector adds filter listing by volume status.
func (*VolumeLister) VolumeNameSelector ¶
func (lister *VolumeLister) VolumeNameSelector(volumeNames []string) *VolumeLister
VolumeNameSelector adds filter listing by volume names.