controller

package
v0.0.0-...-148db3b Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GarbageCollector

type GarbageCollector struct {
	// contains filtered or unexported fields
}

func NewGarbageCollector

func NewGarbageCollector(kubeCli kubernetes.Interface,
	trainingJobLister trainingjoblisters.AITrainingJobLister) *GarbageCollector

func (*GarbageCollector) CleanGarbagePods

func (gc *GarbageCollector) CleanGarbagePods()

func (*GarbageCollector) CleanOrphans

func (gc *GarbageCollector) CleanOrphans(d time.Duration)

type TrainingJobController

type TrainingJobController struct {
	// GroupVersionKind indicates the controller type.
	schema.GroupVersionKind
	// contains filtered or unexported fields
}

func NewTrainingJobController

func NewTrainingJobController(
	kubeClient kubeclientset.Interface,
	trainingJobClient trainingjobclientset.Interface,
	extApiClient apiextensionsclient.Interface,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	trainingJobInformerFactory trainingjobinformers.SharedInformerFactory,
	option options.TrainingJobOperatorOption,
) *TrainingJobController

func (*TrainingJobController) FilterPodsForReplicaType

func (tc *TrainingJobController) FilterPodsForReplicaType(pods []*corev1.Pod, replicaType string) ([]*corev1.Pod, error)

func (*TrainingJobController) FilterServicesForReplicaType

func (tc *TrainingJobController) FilterServicesForReplicaType(services []*corev1.Service, replicaType string) ([]*corev1.Service, error)

func (*TrainingJobController) GenGeneralName

func (tc *TrainingJobController) GenGeneralName(jobName, rtype, index string) string

func (*TrainingJobController) GenLabels

func (tc *TrainingJobController) GenLabels(jobName string) map[string]string

func (*TrainingJobController) GenOwnerReference

func (tc *TrainingJobController) GenOwnerReference(obj metav1.Object) *metav1.OwnerReference

func (*TrainingJobController) GetPodSlices

func (tc *TrainingJobController) GetPodSlices(pods []*corev1.Pod, replicas int) [][]*corev1.Pod

func (*TrainingJobController) GetServiceSlices

func (tc *TrainingJobController) GetServiceSlices(services []*corev1.Service, replicas int) [][]*corev1.Service

func (*TrainingJobController) Run

func (tc *TrainingJobController) Run(workers int, stopCh <-chan struct{}) error

Jump to

Keyboard shortcuts

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