pods

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachePodService

type CachePodService struct {
	PairLock sync.RWMutex
	Pairs    map[types.NamespacedName]types.NamespacedName
	// contains filtered or unexported fields
}

func (CachePodService) DebugPod

func (s CachePodService) DebugPod(c *gin.Context, namespace, name, container string)

func (CachePodService) DownloadDebugFile

func (s CachePodService) DownloadDebugFile(c *gin.Context, namespace, name, container string) error

func (CachePodService) ExecPod

func (s CachePodService) ExecPod(c *gin.Context, namespace, name, container string)

func (CachePodService) ListAppPodMountPods

func (s CachePodService) ListAppPodMountPods(ctx context.Context, pod *corev1.Pod) ([]corev1.Pod, error)

func (*CachePodService) ListAppPods

func (s *CachePodService) ListAppPods(c *gin.Context) (*ListAppPodResult, error)

func (*CachePodService) ListBatchPods

func (s *CachePodService) ListBatchPods(c *gin.Context, conf *config.BatchConfig) ([]corev1.Pod, error)

func (CachePodService) ListCSINodePod

func (s CachePodService) ListCSINodePod(ctx context.Context, nodeName string) ([]corev1.Pod, error)

func (CachePodService) ListMountPodAppPods

func (s CachePodService) ListMountPodAppPods(ctx context.Context, mountPod *corev1.Pod) ([]corev1.Pod, error)

func (CachePodService) ListNodeMountPods

func (s CachePodService) ListNodeMountPods(ctx context.Context, nodeName string) ([]corev1.Pod, error)

func (CachePodService) ListPodPVCs

func (s CachePodService) ListPodPVCs(ctx context.Context, pod *corev1.Pod) ([]corev1.PersistentVolumeClaim, error)

func (CachePodService) ListPodPVs

func (s CachePodService) ListPodPVs(ctx context.Context, pod *corev1.Pod) ([]corev1.PersistentVolume, error)

func (*CachePodService) ListSysPods

func (s *CachePodService) ListSysPods(c *gin.Context) (*ListSysPodResult, error)

func (CachePodService) ListUpgradePods

func (s CachePodService) ListUpgradePods(c *gin.Context, uniqueId string, nodeName string, recreate bool) ([]corev1.Pod, error)

func (*CachePodService) Reconcile

func (*CachePodService) SetupWithManager

func (c *CachePodService) SetupWithManager(mgr manager.Manager) error

func (CachePodService) WarmupPod

func (s CachePodService) WarmupPod(c *gin.Context, namespace, name, container string)

func (CachePodService) WatchMountPodAccessLog

func (s CachePodService) WatchMountPodAccessLog(c *gin.Context, namespace, name, container string)

func (CachePodService) WatchPodLogs

func (s CachePodService) WatchPodLogs(c *gin.Context, namespace, name, container string) error

type ListAppPodResult

type ListAppPodResult struct {
	Total    int        `json:"total,omitempty"`
	Continue string     `json:"continue,omitempty"`
	Pods     []PodExtra `json:"pods"`
}

type ListSysPodResult

type ListSysPodResult struct {
	Total    int        `json:"total"`
	Continue string     `json:"continue"`
	Pods     []PodExtra `json:"pods"`
}

type PodDiff

type PodDiff struct {
	Pod        corev1.Pod           `json:"pod"`
	OldConfig  config.MountPodPatch `json:"oldConfig"`
	OldSetting *config.JfsSetting   `json:"oldSetting,omitempty"`
	NewConfig  config.MountPodPatch `json:"newConfig"`
	NewSetting *config.JfsSetting   `json:"newSetting,omitempty"`
}

type PodExtra

type PodExtra struct {
	*corev1.Pod `json:",inline"`
	Pvs         []corev1.PersistentVolume      `json:"pvs,omitempty"`
	Pvcs        []corev1.PersistentVolumeClaim `json:"pvcs,omitempty"`
	MountPods   []corev1.Pod                   `json:"mountPods,omitempty"`
	CsiNode     *corev1.Pod                    `json:"csiNode,omitempty"`
	Node        *corev1.Node                   `json:"node,omitempty"`
}

type PodService

type PodService interface {
	ListAppPods(ctx *gin.Context) (*ListAppPodResult, error)
	ListSysPods(ctx *gin.Context) (*ListSysPodResult, error)
	ListCSINodePod(ctx context.Context, nodeName string) ([]corev1.Pod, error)
	ListPodPVs(ctx context.Context, pod *corev1.Pod) ([]corev1.PersistentVolume, error)
	ListPodPVCs(ctx context.Context, pod *corev1.Pod) ([]corev1.PersistentVolumeClaim, error)
	ListAppPodMountPods(ctx context.Context, pod *corev1.Pod) ([]corev1.Pod, error)
	ListNodeMountPods(ctx context.Context, nodeName string) ([]corev1.Pod, error)
	ListMountPodAppPods(ctx context.Context, mountPod *corev1.Pod) ([]corev1.Pod, error)
	ListBatchPods(c *gin.Context, conf *config.BatchConfig) ([]corev1.Pod, error)
	ListUpgradePods(c *gin.Context, uniqueId string, nodeName string, recreate bool) ([]corev1.Pod, error)

	ExecPod(c *gin.Context, namespace, name, ontainer string)
	WatchPodLogs(c *gin.Context, namespace, name, container string) error
	WatchMountPodAccessLog(c *gin.Context, namespace, name, container string)
	DebugPod(c *gin.Context, namespace, name, container string)
	WarmupPod(c *gin.Context, namespace, name, container string)
	DownloadDebugFile(c *gin.Context, namespace, name, container string) error
}

func NewPodService

func NewPodService(client client.Client, k8sClient *k8sclient.K8sClient, kubeconfig *rest.Config, enableManager bool) PodService

Jump to

Keyboard shortcuts

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