v1beta1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProviderRegistry = make(map[string]Provider)
	// JobRoleMap is the map which is used to determin if the replica is master.
	// Katib will inject metrics collector into master replica.
	JobRoleMap = make(map[string][]string)
	// SupportedJobList returns the list of the supported jobs' GVK.
	SupportedJobList = make(map[string]schema.GroupVersionKind)
)

Functions

This section is empty.

Types

type Job

type Job struct{}

Job is the provider of Job kind.

func (*Job) Create

func (j *Job) Create(kind string) Provider

func (Job) GetDeployedJobStatus

func (j Job) GetDeployedJobStatus(
	deployedJob *unstructured.Unstructured) (*commonv1.JobCondition, error)

GetDeployedJobStatus get the deployed job status.

func (Job) IsTrainingContainer

func (j Job) IsTrainingContainer(index int, c corev1.Container) bool

IsTrainingContainer returns if the c is the actual training container.

func (Job) MutateJob

func (j Job) MutateJob(*v1beta1.Trial, *unstructured.Unstructured) error

type Kubeflow

type Kubeflow struct {
	Kind string
}

Kubeflow is the provider of Kubeflow kinds.

func (*Kubeflow) Create

func (k *Kubeflow) Create(kind string) Provider

func (Kubeflow) GetDeployedJobStatus

func (k Kubeflow) GetDeployedJobStatus(
	deployedJob *unstructured.Unstructured) (*commonv1.JobCondition, error)

GetDeployedJobStatus get the deployed job status.

func (Kubeflow) IsTrainingContainer

func (k Kubeflow) IsTrainingContainer(index int, c corev1.Container) bool

IsTrainingContainer returns if the c is the actual training container.

func (Kubeflow) MutateJob

type Provider

type Provider interface {
	// GetDeployedJobStatus get the deployed job status.
	GetDeployedJobStatus(
		deployedJob *unstructured.Unstructured) (*commonv1.JobCondition, error)
	// IsTrainingContainer returns if the c is the actual training container.
	IsTrainingContainer(index int, c corev1.Container) bool
	// Mutate jobSpec before creation if necessary
	MutateJob(*v1beta1.Trial, *unstructured.Unstructured) error
	// Recreate Provider from kind
	Create(kind string) Provider
}

Provider provides utilities for different jobs.

func New

func New(kind string) (Provider, error)

New creates a new Provider.

Jump to

Keyboard shortcuts

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