controller

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobSyncControllerName = "JobSync"
	DefaultSyncRetryTimes = 3
)
View Source
const (
	DefaultJobPendingTTLSeconds = 300

	RuntimeStatusKey = "status"

	PodInitializing   = "PodInitializing"
	ContainerCreating = "ContainerCreating"
)
View Source
const (
	DefaultJobTTLSeconds = 600
)
View Source
const (
	JobGCControllerName = "JobGarbageCollector"
)
View Source
const (
	QueueSyncControllerName = "QueueSync"
)

Variables

This section is empty.

Functions

func FindOwnerReferenceName

func FindOwnerReferenceName(ownerReferences []metav1.OwnerReference) string

Types

type Controller

type Controller interface {
	Name() string
	Initialize(opt *k8s.DynamicClientOption) error
	Run(stopCh <-chan struct{})
}

Controller interface for kubernetes job sync, job gc, and queue sync

func New

func New(name string, conf *rest.Config, cluster *schema.Cluster) (Controller, error)

func NewJobGC

func NewJobGC() Controller

func NewJobSync

func NewJobSync() Controller

func NewQueueSync

func NewQueueSync() Controller

type FinishedJobInfo

type FinishedJobInfo struct {
	Namespace          string
	Name               string
	OwnerName          string
	OwnerReferences    []metav1.OwnerReference
	Duration           time.Duration
	LastTransitionTime metav1.Time
	GVK                schema.GroupVersionKind
}

type JobGarbageCollector

type JobGarbageCollector struct {
	sync.Mutex

	WaitedCleanQueue workqueue.DelayingInterface
	// contains filtered or unexported fields
}

func (*JobGarbageCollector) GetDynamicInformer

func (*JobGarbageCollector) GetDynamicLister

func (*JobGarbageCollector) Initialize

func (j *JobGarbageCollector) Initialize(opt *k8s.DynamicClientOption) error

func (*JobGarbageCollector) Name

func (j *JobGarbageCollector) Name() string

func (*JobGarbageCollector) Run

func (j *JobGarbageCollector) Run(stopCh <-chan struct{})

type JobSync

type JobSync struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*JobSync) Initialize

func (j *JobSync) Initialize(opt *k8s.DynamicClientOption) error

func (*JobSync) Name

func (j *JobSync) Name() string

func (*JobSync) Run

func (j *JobSync) Run(stopCh <-chan struct{})

type JobSyncInfo

type JobSyncInfo struct {
	ID            string
	Namespace     string
	ParentJobID   string
	GVK           schema.GroupVersionKind
	Status        commonschema.JobStatus
	RuntimeInfo   interface{}
	RuntimeStatus interface{}
	Message       string
	Action        commonschema.ActionType
	RetryTimes    int
}

func (*JobSyncInfo) String

func (js *JobSyncInfo) String() string

type QueueSync

type QueueSync struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*QueueSync) Initialize

func (qs *QueueSync) Initialize(opt *k8s.DynamicClientOption) error

func (*QueueSync) Name

func (qs *QueueSync) Name() string

func (*QueueSync) Run

func (qs *QueueSync) Run(stopCh <-chan struct{})

type QueueSyncInfo

type QueueSyncInfo struct {
	Name        string
	Namespace   string
	Labels      map[string]string
	Status      string
	QuotaType   string
	MaxResource *resources.Resource
	MinResource *resources.Resource
	Action      commonschema.ActionType
	Message     string
	RetryTimes  int
}

type TaskSyncInfo

type TaskSyncInfo struct {
	ID         string
	Name       string
	Namespace  string
	JobID      string
	NodeName   string
	MemberRole commonschema.MemberRole
	Status     commonschema.TaskStatus
	Message    string
	PodStatus  interface{}
	Action     commonschema.ActionType
	RetryTimes int
}

Jump to

Keyboard shortcuts

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