Documentation
¶
Index ¶
- Constants
- func AttachmentsByPV(attachments []storagev1.VolumeAttachment) map[string]*storagev1.VolumeAttachment
- func EvacuateSatellite(ctx context.Context, cl client.Client, lclient *lapi.Client, ...) (string, bool, error)
- func PVCOrPVEventf(recorder record.EventRecorder, pv *corev1.PersistentVolume, ...)
- func PVsByLinstorResource(pvs []corev1.PersistentVolume) map[string]*corev1.PersistentVolume
- type PVEvacuationAction
Constants ¶
View Source
const ( VolumeEvacuatingEvent = "VolumeEvacuating" VolumeTemporarilyMadeReschedulableEvent = "VolumeTemporarilyMadeReschedulable" VolumeDeletedForEvacuationEvent = "VolumeDeletedForEvacuation" VolumeNotAttachedForEvacuationEvent = "VolumeNotAttachedForEvacuation" VolumeAttachedForEvacuationEvent = "VolumeAttachedForEvacuation" )
Variables ¶
This section is empty.
Functions ¶
func AttachmentsByPV ¶ added in v2.10.2
func AttachmentsByPV(attachments []storagev1.VolumeAttachment) map[string]*storagev1.VolumeAttachment
func EvacuateSatellite ¶
func EvacuateSatellite(ctx context.Context, cl client.Client, lclient *lapi.Client, recorder record.EventRecorder, node *lapi.Node, machineClient *clusterapi.Client, machine *clusterapi.Machine, evacuationStrategy *piraeusiov1.EvacuationStrategy) (string, bool, error)
EvacuateSatellite by ensuring all LINSTOR Resource have been moved to other nodes.
Returns a message indicating the current progress and a bool indicating if evacuation is complete. The function should be called repeatedly until completion of the evacuation.
func PVCOrPVEventf ¶ added in v2.10.2
func PVCOrPVEventf(recorder record.EventRecorder, pv *corev1.PersistentVolume, eventtype, reason, message string, args ...interface{})
PVCOrPVEventf records an event, either for the PVC or for the PV, if no PVC is currently bound.
func PVsByLinstorResource ¶ added in v2.10.2
func PVsByLinstorResource(pvs []corev1.PersistentVolume) map[string]*corev1.PersistentVolume
PVsByLinstorResource converts a list of PersistentVolumes to a map of LINSTOR Resource Names -> Persistent Volumes
Types ¶
type PVEvacuationAction ¶
type PVEvacuationAction string
const ( // PVEvacuationActionNone indicates the PV is ready for evacuation as-is. PVEvacuationActionNone PVEvacuationAction = "None" // PVEvacuationActionDelete indicates the PV and PVC should be deleted so that it gets recreated on draining the node. PVEvacuationActionDelete PVEvacuationAction = "Delete" // PVEvacuationActionAffinityOverride indicates the PV should be prepared for evacuation by setting a less strict affinity. PVEvacuationActionAffinityOverride PVEvacuationAction = "AffinityOverride" )
Click to show internal directories.
Click to hide internal directories.