v1alpha1

package
v0.0.0-...-3773f5b Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// GroupName is the group name use in this package.
	GroupName = "kubeflow.org"
	// Caffe2JobResourceKind is the kind name.
	Caffe2JobResourceKind = "Caffe2Job"
	// GroupVersion is the version.
	GroupVersion = "v1alpha1"
)
View Source
const (
	CRDKind       = "caffe2job"
	CRDKindPlural = "caffe2jobs"
	CRDGroup      = "kubeflow.org"
	CRDVersion    = "v1alpha1"
	// Value of the APP label that gets applied to a lot of entities.
	AppLabel = "caffe2-job"
	// Defaults for the Spec
	Caffe2Port         = 2222
	Replicas           = 1
	CAFFE2             = "caffe2"
	DefaultCaffe2Image = "kubeflow/caffe2:py2-cuda9.0-cudnn7-ubuntu16.04"
)

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 = schema.GroupVersion{Group: GroupName, Version: GroupVersion}

SchemeGroupVersion is the group version used to register these objects.

Functions

func RegisterDeepCopies deprecated

func RegisterDeepCopies(scheme *runtime.Scheme) error

RegisterDeepCopies adds deep-copy functions to the given scheme. Public to allow building arbitrary schemes.

Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.

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_Caffe2Job

func SetDefaults_Caffe2Job(obj *Caffe2Job)

SetDefaults_Caffe2Job sets any unspecified values to defaults

func SetObjectDefaults_Caffe2Job

func SetObjectDefaults_Caffe2Job(in *Caffe2Job)

func SetObjectDefaults_Caffe2JobList

func SetObjectDefaults_Caffe2JobList(in *Caffe2JobList)

Types

type BackendType

type BackendType string

BackendType backend type

var (
	NoneBackendType  BackendType = "none"
	RedisBackendType BackendType = "redis"
	NFSBackendType   BackendType = "nfs"
)

type Caffe2BackendSpec

type Caffe2BackendSpec struct {
	Type      BackendType `json:"backendType"`
	NFSPath   string      `json:"nfsPath"`
	RedisHost string      `json:"redisHost"`
	RedisPort uint        `json:"redisPort"`
}

Caffe2BackendSpec

func (*Caffe2BackendSpec) DeepCopy

func (in *Caffe2BackendSpec) DeepCopy() *Caffe2BackendSpec

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

func (*Caffe2BackendSpec) DeepCopyInto

func (in *Caffe2BackendSpec) DeepCopyInto(out *Caffe2BackendSpec)

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

type Caffe2Job

type Caffe2Job struct {
	metav1.TypeMeta `json:",inline"`

	// Standard object's metadata.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the Caffe2Job.
	Spec Caffe2JobSpec `json:"spec"`

	// Most recently observed status of the Caffe2Job
	Status Caffe2JobStatus `json:"status"`
}

Caffe2Job describes caffe2job info

func (*Caffe2Job) DeepCopy

func (in *Caffe2Job) DeepCopy() *Caffe2Job

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

func (*Caffe2Job) DeepCopyInto

func (in *Caffe2Job) DeepCopyInto(out *Caffe2Job)

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

func (*Caffe2Job) DeepCopyObject

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

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

type Caffe2JobCondition

type Caffe2JobCondition struct {
	// Type of Caffe2Job condition.
	Type Caffe2JobConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

Caffe2JobCondition describes the state of the Caffe2Job at a certain point.

func (*Caffe2JobCondition) DeepCopy

func (in *Caffe2JobCondition) DeepCopy() *Caffe2JobCondition

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

func (*Caffe2JobCondition) DeepCopyInto

func (in *Caffe2JobCondition) DeepCopyInto(out *Caffe2JobCondition)

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

type Caffe2JobConditionType

type Caffe2JobConditionType string

Caffe2JobConditionType defines all kinds of types of Caffe2JobStatus.

const (
	// Caffe2JobCreated means the caffe2job has been accepted by the system,
	// but one or more of the pods/services has not been started.
	// This includes time before pods being scheduled and launched.
	Caffe2JobCreated Caffe2JobConditionType = "Created"

	// Caffe2JobRunning means all sub-resources (e.g. services/pods) of this Caffe2Job
	// have been successfully scheduled and launched.
	// The training is running without error.
	Caffe2JobRunning Caffe2JobConditionType = "Running"

	// Caffe2JobSucceeded means all sub-resources (e.g. services/pods) of this Caffe2Job
	// reached phase have terminated in success.
	// The training is complete without error.
	Caffe2JobSucceeded Caffe2JobConditionType = "Succeeded"

	// Caffe2JobFailed means one or more sub-resources (e.g. services/pods) of this Caffe2Job
	// reached phase failed with no restarting.
	// The training has failed its execution.
	Caffe2JobFailed Caffe2JobConditionType = "Failed"
)

type Caffe2JobList

type Caffe2JobList 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 Caffe2Jobs
	Items []Caffe2Job `json:"items"`
}

Caffe2JobList is a list of Caffe2Jobs clusters.

func (*Caffe2JobList) DeepCopy

func (in *Caffe2JobList) DeepCopy() *Caffe2JobList

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

func (*Caffe2JobList) DeepCopyInto

func (in *Caffe2JobList) DeepCopyInto(out *Caffe2JobList)

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

func (*Caffe2JobList) DeepCopyObject

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

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

type Caffe2JobSpec

type Caffe2JobSpec struct {
	// RuntimeID
	RuntimeID string

	// Backend specifies the nodes’ communications tool
	Backend *Caffe2BackendSpec `json:"backendSpecs"`

	// ReplicaSpecs specifies the Caffe2 replicas to run.
	ReplicaSpecs *Caffe2ReplicaSpec `json:"replicaSpecs"`

	// TerminationPolicy specifies the condition that the caffe2job should be considered finished.
	TerminationPolicy *TerminationPolicySpec `json:"terminationPolicy,omitempty"`
}

func (*Caffe2JobSpec) DeepCopy

func (in *Caffe2JobSpec) DeepCopy() *Caffe2JobSpec

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

func (*Caffe2JobSpec) DeepCopyInto

func (in *Caffe2JobSpec) DeepCopyInto(out *Caffe2JobSpec)

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

type Caffe2JobStatus

type Caffe2JobStatus struct {
	// Conditions is an array of current observed Caffe2Job conditions.
	Conditions []Caffe2JobCondition `json:"conditions"`

	// ReplicaStatuses specifies the status of each Caffe2 replica.
	ReplicaStatuses *Caffe2ReplicaStatus `json:"replicaStatuses"`

	// Represents time when the Caffe2Job was acknowledged by the Caffe2Job controller.
	// It is not guaranteed to be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC.
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// Represents time when the Caffe2Job was completed. It is not guaranteed to
	// be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC.
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// Represents last time when the Caffe2Job was reconciled. It is not guaranteed to
	// be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC.
	LastReconcileTime *metav1.Time `json:"lastReconcileTime,omitempty"`
}

func (*Caffe2JobStatus) DeepCopy

func (in *Caffe2JobStatus) DeepCopy() *Caffe2JobStatus

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

func (*Caffe2JobStatus) DeepCopyInto

func (in *Caffe2JobStatus) DeepCopyInto(out *Caffe2JobStatus)

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

type Caffe2ReplicaSpec

type Caffe2ReplicaSpec struct {
	// Replicas is the number of desired replicas.
	// This is a pointer to distinguish between explicit zero and unspecified.
	// Defaults to 1.
	// More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller
	// +optional
	Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`

	//  Template is the object that describes the pod that
	// will be created for this Caffe2Replica.
	Template *v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
}

func (*Caffe2ReplicaSpec) DeepCopy

func (in *Caffe2ReplicaSpec) DeepCopy() *Caffe2ReplicaSpec

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

func (*Caffe2ReplicaSpec) DeepCopyInto

func (in *Caffe2ReplicaSpec) DeepCopyInto(out *Caffe2ReplicaSpec)

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

type Caffe2ReplicaStatus

type Caffe2ReplicaStatus struct {
	// The number of actively running pods.
	Active int32 `json:"active,omitempty"`

	// The number of pods which reached phase Succeeded.
	Succeeded int32 `json:"succeeded,omitempty"`

	// The number of pods which reached phase Failed.
	Failed int32 `json:"failed,omitempty"`
}

Caffe2ReplicaStatus represents the current observed state of the Caffe2Replica.

func (*Caffe2ReplicaStatus) DeepCopy

func (in *Caffe2ReplicaStatus) DeepCopy() *Caffe2ReplicaStatus

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

func (*Caffe2ReplicaStatus) DeepCopyInto

func (in *Caffe2ReplicaStatus) DeepCopyInto(out *Caffe2ReplicaStatus)

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

type ChiefSpec

type ChiefSpec struct {
	ReplicaName  string `json:"replicaName"`
	ReplicaIndex int    `json:"replicaIndex"`
}

func (*ChiefSpec) DeepCopy

func (in *ChiefSpec) DeepCopy() *ChiefSpec

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

func (*ChiefSpec) DeepCopyInto

func (in *ChiefSpec) DeepCopyInto(out *ChiefSpec)

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

type TerminationPolicySpec

type TerminationPolicySpec struct {
	// Chief policy waits for a particular process (which is the chief) to exit.
	Chief *ChiefSpec `json:"chief,omitempty"`
}

TerminationPolicySpec

func (*TerminationPolicySpec) DeepCopy

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

func (*TerminationPolicySpec) DeepCopyInto

func (in *TerminationPolicySpec) DeepCopyInto(out *TerminationPolicySpec)

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