Documentation ¶
Index ¶
- Variables
- func CreateVolumeWithAnnotations(namespace, pvcName string, annotations map[string]string) error
- func DeleteVolumeWithAnnotations(pvName string, annotations map[string]string) error
- func SetupSignalHandlerPV() (stopCh <-chan struct{})
- func SetupSignalHandlerPVC() (stopCh <-chan struct{})
- func UpdatePvWithAnnotations(ctx context.Context, pvName string, annotations map[string]string) error
- func UpdatePvcWithAnnotations(ctx context.Context, namespace, pvcName string, annotations map[string]string) error
- func VolumeHandler()
- type ActualStateOfWordPv
- type ActualStateOfWordPvc
- type DesiredStateOfWordPv
- type DesiredStateOfWordPvc
Constants ¶
This section is empty.
Variables ¶
var ActualStateOfPv = ActualStateOfWordPv{}
ActualStateOfPv actual pv
var ActualStateOfPvc = ActualStateOfWordPvc{}
ActualStateOfPvc record actual pvc
var DesiredStateOfPv = DesiredStateOfWordPv{}
DesiredStateOfPv desired pv
var DesiredStateOfPvc = DesiredStateOfWordPvc{}
DesiredStateOfPvc record desired pvc
Functions ¶
func CreateVolumeWithAnnotations ¶ added in v1.1.1
CreateVolumeWithAnnotations create volume
func DeleteVolumeWithAnnotations ¶ added in v1.1.1
DeleteVolumeWithAnnotations delete volume
func SetupSignalHandlerPV ¶
func SetupSignalHandlerPV() (stopCh <-chan struct{})
SetupSignalHandlerPV set signal handler
func SetupSignalHandlerPVC ¶
func SetupSignalHandlerPVC() (stopCh <-chan struct{})
SetupSignalHandlerPVC registered for SIGTERM and SIGINT. A stop channel is returned which is closed on one of these signals. If a second signal is caught, the program is terminated with exit code 1.
func UpdatePvWithAnnotations ¶ added in v1.1.1
func UpdatePvWithAnnotations(ctx context.Context, pvName string, annotations map[string]string) error
UpdatePvWithAnnotations udpate pv
Types ¶
type ActualStateOfWordPv ¶
type ActualStateOfWordPv struct { ActualPvMap map[string]*corev1.PersistentVolume sync.RWMutex }
ActualStateOfWordPv save the actual state of volume in node.
func (*ActualStateOfWordPv) Add ¶
func (dsw *ActualStateOfWordPv) Add(pv *corev1.PersistentVolume)
Add pv object
func (*ActualStateOfWordPv) Remove ¶
func (dsw *ActualStateOfWordPv) Remove(pv *corev1.PersistentVolume)
Remove pv object
type ActualStateOfWordPvc ¶
type ActualStateOfWordPvc struct { ActualPvcMap map[string]*corev1.PersistentVolumeClaim sync.RWMutex }
ActualStateOfWordPvc the actual pvc state
func (*ActualStateOfWordPvc) Add ¶
func (dsw *ActualStateOfWordPvc) Add(pvc *corev1.PersistentVolumeClaim)
Add object
func (*ActualStateOfWordPvc) Remove ¶
func (dsw *ActualStateOfWordPvc) Remove(pvc *corev1.PersistentVolumeClaim)
Remove object
type DesiredStateOfWordPv ¶
type DesiredStateOfWordPv struct { DesiredPvMap map[string]*corev1.PersistentVolume sync.RWMutex }
DesiredStateOfWordPv desired pv
func (*DesiredStateOfWordPv) Add ¶
func (dsw *DesiredStateOfWordPv) Add(pv *corev1.PersistentVolume)
Add add pv
func (*DesiredStateOfWordPv) Remove ¶
func (dsw *DesiredStateOfWordPv) Remove(pv *corev1.PersistentVolume)
Remove remove pv
type DesiredStateOfWordPvc ¶
type DesiredStateOfWordPvc struct { DesiredPvcMap map[string]*corev1.PersistentVolumeClaim sync.RWMutex }
DesiredStateOfWordPvc the desired pvc state
func (*DesiredStateOfWordPvc) Add ¶
func (dsw *DesiredStateOfWordPvc) Add(pvc *corev1.PersistentVolumeClaim)
Add object
func (*DesiredStateOfWordPvc) Remove ¶
func (dsw *DesiredStateOfWordPvc) Remove(pvc *corev1.PersistentVolumeClaim)
Remove object