localdisk

package
v0.15.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func NewLocalDiskHandler

func NewLocalDiskHandler(cli client.Client, recorder record.EventRecorder) *Handler

func (*Handler) BoundTo

func (ldHandler *Handler) BoundTo(ldc *v1alpha1.LocalDiskClaim) error

BoundTo assign disk to ldc

func (*Handler) ClaimRef

func (ldHandler *Handler) ClaimRef() *v1.ObjectReference

func (*Handler) FilterDisk

func (ldHandler *Handler) FilterDisk(ldc *v1alpha1.LocalDiskClaim) bool

func (*Handler) For

func (ldHandler *Handler) For(ld *v1alpha1.LocalDisk) *Handler

func (*Handler) GetFilterFailMessages

func (ldHandler *Handler) GetFilterFailMessages() map[string]bool

func (*Handler) GetLocalDisk

func (ldHandler *Handler) GetLocalDisk(key client.ObjectKey) (*v1alpha1.LocalDisk, error)

func (*Handler) GetLocalDiskWithLabels

func (ldHandler *Handler) GetLocalDiskWithLabels(labels labels.Set) (*v1alpha1.LocalDiskList, error)

func (*Handler) IsEmpty

func (ldHandler *Handler) IsEmpty() bool

func (*Handler) ListLocalDisk

func (ldHandler *Handler) ListLocalDisk() (*v1alpha1.LocalDiskList, error)

func (*Handler) ListLocalDiskByNodeDevicePath

func (ldHandler *Handler) ListLocalDiskByNodeDevicePath(nodeName, devPath string) ([]v1alpha1.LocalDisk, error)

ListLocalDiskByNodeDevicePath returns LocalDisks by given node device path This is should only be used when disk serial cannot be found(e.g. trigger by disk remove events)

func (*Handler) ListLocalDiskDirectly

func (ldHandler *Handler) ListLocalDiskDirectly() (*v1alpha1.LocalDiskList, error)

ListLocalDiskDirectly query localdisk list from API Server directly NOTE: The performance is relatively slow and may cause relatively high latency

func (*Handler) ListNodeLocalDisk

func (ldHandler *Handler) ListNodeLocalDisk(node string) (*v1alpha1.LocalDiskList, error)

func (*Handler) PatchDiskOwner

func (ldHandler *Handler) PatchDiskOwner(owner string) error

func (*Handler) PatchDiskSpec

func (ldHandler *Handler) PatchDiskSpec(patch client.Patch) error

func (*Handler) RecordEvent

func (ldHandler *Handler) RecordEvent(eventtype, reason, messageFmt string, args ...interface{})

func (*Handler) RemoveLabel

func (ldHandler *Handler) RemoveLabel(labels labels.Set)

func (*Handler) ReserveDisk

func (ldHandler *Handler) ReserveDisk()

func (*Handler) SetOwner

func (ldHandler *Handler) SetOwner(owner string)

func (*Handler) SetPartition

func (ldHandler *Handler) SetPartition(hasPartition bool)

func (*Handler) SetupLabel

func (ldHandler *Handler) SetupLabel(labels labels.Set)

func (*Handler) SetupStatus

func (ldHandler *Handler) SetupStatus(status v1alpha1.LocalDiskState)

func (*Handler) UnClaimed

func (ldHandler *Handler) UnClaimed() bool

UnClaimed Bounded

func (*Handler) Update

func (ldHandler *Handler) Update() error

func (*Handler) UpdateStatus

func (ldHandler *Handler) UpdateStatus() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL