v1alpha1

package
v0.0.0-...-d8b821e Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=kubeflow.org

Index

Constants

View Source
const (
	// DefaultContainerName is the default container name
	DefaultContainerName = "chainer"
	// DefaultSlots is the default slot
	DefaultSlots = 1

	// DefaultRestartPolicy is the default restart policy
	DefaultRestartPolicy = "Never"
)
View Source
const (
	// GroupName is the group name use in this package.
	GroupName = "kubeflow.org"
	// Kind is the kind name.
	Kind = "ChainerJob"
	// GroupVersion is the version.
	GroupVersion = "v1alpha1"
	// Plural is the Plural for ChainerJob.
	Plural = "chainerjobs"
	// Singular is the singular for ChainerJob.
	Singular = "chainerjob"
)

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var (
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{
		Group:   GroupName,
		Version: GroupVersion,
	}
	// SchemeGroupVersionKind is the GroupVersionKind of the resource.
	SchemeGroupVersionKind = SchemeGroupVersion.WithKind(Kind)
)

Functions

func Int32

func Int32(v int32) *int32

Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.

func IsDistributed

func IsDistributed(chjob *ChainerJob) bool

IsDistributed returns the chainerjob is distributed mode or not.

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

func SetDefaults_ChainerJob

func SetDefaults_ChainerJob(chainerjob *ChainerJob)

SetDefaults_ChainerJob sets any unspecified values to defaults.

func SetObjectDefaults_ChainerJob

func SetObjectDefaults_ChainerJob(in *ChainerJob)

func SetObjectDefaults_ChainerJobList

func SetObjectDefaults_ChainerJobList(in *ChainerJobList)

Types

type BackendType

type BackendType string

BackendType is the type of backend

const (
	// BackendTypeMPI = "mpi"
	BackendTypeMPI BackendType = "mpi"
)

type ChainerJob

type ChainerJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ChainerJobSpec    `json:"spec"`
	Status            batchv1.JobStatus `json:"status"`
}

ChainerJob describbe chainerjob info

func (*ChainerJob) DeepCopy

func (in *ChainerJob) DeepCopy() *ChainerJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainerJob.

func (*ChainerJob) DeepCopyInto

func (in *ChainerJob) DeepCopyInto(out *ChainerJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChainerJob) DeepCopyObject

func (in *ChainerJob) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChainerJobList

type ChainerJobList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of ChainerJobs
	Items []ChainerJob `json:"items"`
}

ChainerJobList is a list of ChainerJob clusters.

func (*ChainerJobList) DeepCopy

func (in *ChainerJobList) DeepCopy() *ChainerJobList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainerJobList.

func (*ChainerJobList) DeepCopyInto

func (in *ChainerJobList) DeepCopyInto(out *ChainerJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ChainerJobList) DeepCopyObject

func (in *ChainerJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ChainerJobSpec

type ChainerJobSpec struct {
	// Backend is a type of backend for how to communicate processes.
	// This is valid only when WorkerSet present.
	Backend BackendType `json:"backend,omitempty"`

	// Master is a master of the job
	Master MasterSpec `json:"master"`

	// WorkerSets is a map whose key is workerset name and value is WorkerSetSpec
	// User can define heterogeneous WorkserSets
	WorkerSets map[string]*WorkerSetSpec `json:"workerSets,omitempty"`
}

ChainerJobSpec defines a spec or ChainerJob

func (*ChainerJobSpec) DeepCopy

func (in *ChainerJobSpec) DeepCopy() *ChainerJobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainerJobSpec.

func (*ChainerJobSpec) DeepCopyInto

func (in *ChainerJobSpec) DeepCopyInto(out *ChainerJobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MPIConfig

type MPIConfig struct {
	Slots *int32 `json:"slots,omitempty"`
}

MPIConfig is config object for `backend: mpi`

func (*MPIConfig) DeepCopy

func (in *MPIConfig) DeepCopy() *MPIConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIConfig.

func (*MPIConfig) DeepCopyInto

func (in *MPIConfig) DeepCopyInto(out *MPIConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MasterSpec

type MasterSpec struct {
	ActiveDeadlineSeconds *int64             `json:"activeDeadlineSeconds,omitempty"`
	BackoffLimit          *int32             `json:"backoffLimit,omitempty"`
	MPIConfig             *MPIConfig         `json:"mpiConfig,omitempty"`
	Template              v1.PodTemplateSpec `json:"template"`
}

MasterSpec defines a spec of master of mpi cluster

func (*MasterSpec) DeepCopy

func (in *MasterSpec) DeepCopy() *MasterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterSpec.

func (*MasterSpec) DeepCopyInto

func (in *MasterSpec) DeepCopyInto(out *MasterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkerSetSpec

type WorkerSetSpec struct {
	Replicas  *int32             `json:"replicas"`
	MPIConfig *MPIConfig         `json:"mpiConfig"`
	Template  v1.PodTemplateSpec `json:"template"`
}

WorkerSetSpec defines spec of workers of mpi cluster

func (*WorkerSetSpec) DeepCopy

func (in *WorkerSetSpec) DeepCopy() *WorkerSetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerSetSpec.

func (*WorkerSetSpec) DeepCopyInto

func (in *WorkerSetSpec) DeepCopyInto(out *WorkerSetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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