Documentation ¶
Index ¶
- Constants
- 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 DownloadPodFile(client kubernetes.Interface, cfg *rest.Config, writer io.Writer, ...) error
- func ExecInPod(client kubernetes.Interface, cfg *rest.Config, h Handler, ...) error
- func GetAllRefKeys(pod corev1.Pod) map[string]string
- func GetMountPathOfPod(pod corev1.Pod) (string, string, error)
- func GetNamespace(ctx context.Context, client *k8sclient.K8sClient, pod *corev1.Pod) (namespace string, err error)
- func GetPVWithVolumeHandleOrAppInfo(ctx context.Context, client *k8s.K8sClient, volumeHandle string, ...) (*corev1.PersistentVolume, *corev1.PersistentVolumeClaim, 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 NewTerminalSession(ctx context.Context, conn *websocket.Conn, endOfTransmission string) *terminalSession
- 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 Handler
- type ObjectMeta
- type PVPair
- type VolumeLocks
Constants ¶
View Source
const ( // (Ctrl-C) to interrupt or terminate a program or process. EndOfText = "\u0003" // (Ctrl-D) to indicate end-of-file on a terminal. EndOfTransmission = "\u0004" )
Variables ¶
This section is empty.
Functions ¶
func AddPodAnnotation ¶
func AddPodLabel ¶
func AddSecretFinalizer ¶
func CheckForSecretFinalizer ¶
func CheckForSubPath ¶
func DelPodAnnotation ¶
func DeleteResourceOfPod ¶
func DownloadPodFile ¶ added in v0.24.5
func GetMountPathOfPod ¶ added in v0.24.6
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 GetPVWithVolumeHandleOrAppInfo ¶ added in v0.24.6
func IsJobCompleted ¶
func IsJobFailed ¶
func IsJobShouldBeRecycled ¶
func IsPodError ¶
func IsPodHasResource ¶
func IsPodReady ¶
func IsPodResourceError ¶
func NewTerminalSession ¶ added in v0.24.5
func RemoveFinalizer ¶
func RemoveSecretFinalizer ¶
func ReplacePodAnnotation ¶
func ShouldDelay ¶
Types ¶
type Handler ¶ added in v0.24.5
type Handler interface { io.Reader io.Writer remotecommand.TerminalSizeQueue }
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.