Documentation
¶
Index ¶
- func AddPodAnnotation(ctx context.Context, client *k8sclient.K8sClient, pod *corev1.Pod, ...) error
- func AddPodLabel(ctx context.Context, client *k8sclient.K8sClient, pod *corev1.Pod, ...) error
- func AddSecretFinalizer(ctx context.Context, client *k8s.K8sClient, secret *v1.Secret, ...) error
- func CheckForSecretFinalizer(ctx context.Context, client *k8s.K8sClient, volume *v1.PersistentVolume) (shouldRemoveFinalizer bool, err error)
- func CheckForSubPath(ctx context.Context, client *k8s.K8sClient, volume *v1.PersistentVolume, ...) (shouldDeleted bool, err error)
- func DelPodAnnotation(ctx context.Context, client *k8sclient.K8sClient, pod *corev1.Pod, ...) error
- func DeleteResourceOfPod(pod *corev1.Pod)
- func GetAllRefKeys(pod corev1.Pod) map[string]string
- func GetNamespace(ctx context.Context, client *k8sclient.K8sClient, pod *corev1.Pod) (namespace string, err error)
- func IsJobCompleted(job *batchv1.Job) bool
- func IsJobFailed(job *batchv1.Job) bool
- func IsJobShouldBeRecycled(job *batchv1.Job) bool
- func IsPodError(pod *corev1.Pod) bool
- func IsPodHasResource(pod corev1.Pod) bool
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodResourceError(pod *corev1.Pod) bool
- func RemoveFinalizer(ctx context.Context, client *k8sclient.K8sClient, pod *corev1.Pod, ...) error
- func RemoveSecretFinalizer(ctx context.Context, client *k8s.K8sClient, secret *v1.Secret, ...) error
- func ReplacePodAnnotation(ctx context.Context, client *k8sclient.K8sClient, pod *corev1.Pod, ...) error
- func ShouldDelay(ctx context.Context, pod *corev1.Pod, Client *k8s.K8sClient) (shouldDelay bool, err error)
- func WaitUtilMountReady(ctx context.Context, podName, mntPath string, timeout time.Duration) error
- type ObjectMeta
- type PVPair
- type VolumeLocks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPodAnnotation ¶
func AddPodLabel ¶
func AddSecretFinalizer ¶
func CheckForSecretFinalizer ¶
func CheckForSubPath ¶
func DelPodAnnotation ¶
func DeleteResourceOfPod ¶
func GetNamespace ¶
func GetNamespace(ctx context.Context, client *k8sclient.K8sClient, pod *corev1.Pod) (namespace string, err error)
GetNamespace get juicefs pv & pvc from pod when pod namespace is empty
func IsJobCompleted ¶
func IsJobFailed ¶
func IsJobShouldBeRecycled ¶
func IsPodError ¶
func IsPodHasResource ¶
func IsPodReady ¶
func IsPodResourceError ¶
func RemoveFinalizer ¶
func RemoveSecretFinalizer ¶
func ReplacePodAnnotation ¶
func ShouldDelay ¶
Types ¶
type ObjectMeta ¶
type ObjectMeta struct {
// contains filtered or unexported fields
}
func NewObjectMeta ¶
func NewObjectMeta(pvc v1.PersistentVolumeClaim, node *v1.Node) *ObjectMeta
func (*ObjectMeta) ResolveSecret ¶
func (meta *ObjectMeta) ResolveSecret(str string, pvName string) string
func (*ObjectMeta) StringParser ¶
func (meta *ObjectMeta) StringParser(str string) string
type PVPair ¶
type PVPair struct {
PV *corev1.PersistentVolume
PVC *corev1.PersistentVolumeClaim
}
type VolumeLocks ¶
type VolumeLocks struct {
// contains filtered or unexported fields
}
func NewVolumeLocks ¶
func NewVolumeLocks() *VolumeLocks
func (*VolumeLocks) Release ¶
func (vl *VolumeLocks) Release(volumeID string)
Release deletes the lock on volumeID.
func (*VolumeLocks) TryAcquire ¶
func (vl *VolumeLocks) TryAcquire(volumeID string) bool
Click to show internal directories.
Click to hide internal directories.