pod_controller

package
v0.0.0-...-2af97ec Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Preparing     = corev1.PodPhase("Preparing")
	Deleting      = corev1.PodPhase("Deleting")
	CreateTimeOut = corev1.PodPhase("CreateTimeOut")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PodCtrl

type PodCtrl struct {
	client.Client
}

func (*PodCtrl) DeletePodAll

func (podctrl *PodCtrl) DeletePodAll(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod) bool

func (*PodCtrl) ExpansionPod

func (podctrl *PodCtrl) ExpansionPod(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, index int) (*iapetosapiv1.PodStatus, error)

扩容 pod

func (*PodCtrl) IsPodDeleting

func (podctrl *PodCtrl) IsPodDeleting(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, index int) bool

func (*PodCtrl) MaintainPod

func (podctrl *PodCtrl) MaintainPod(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod) *int

func (*PodCtrl) MonitorPodStatus

func (podctrl *PodCtrl) MonitorPodStatus(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, pod *corev1.Pod, index *int) bool

func (*PodCtrl) PodIsOk

func (podctrl *PodCtrl) PodIsOk(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod) *int

func (*PodCtrl) ShrinkPod

func (podctrl *PodCtrl) ShrinkPod(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, index int) bool

缩容 pod

type PodCtrlFunc

type PodCtrlFunc interface {
	ExpansionPod(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, index int) (*iapetosapiv1.PodStatus, error)
	ShrinkPod(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, index int) bool
	DeletePodAll(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod) bool
	MaintainPod(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod) *int
	MonitorPodStatus(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, pod *corev1.Pod, index *int) bool
	PodIsOk(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod) *int
	//IsCreationPodTimeout(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, index int) bool
	IsPodDeleting(ctx context.Context, statefulPod *iapetosapiv1.StatefulPod, index int) bool
}

func NewPodCtrl

func NewPodCtrl(client client.Client) PodCtrlFunc

Jump to

Keyboard shortcuts

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