Documentation
¶
Overview ¶
+k8s:openapi-gen=true +k8s:deepcopy-gen=package +groupName=ava.qiniu.com
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- type MXJob
- type MXJobCondition
- type MXJobConditionType
- type MXJobList
- type MXJobPhase
- type MXJobReason
- type MXJobSpec
- type MXJobStatus
- type MXReplicaSpec
- type MXReplicaSpecs
- type MXReplicaStatus
- type MXReplicaStatuses
- type MXReplicaType
- type Notification
- type NotificationRequest
- type NotificationResponse
- type Webhook
Constants ¶
const ( // MXJobReasonCreated is added in a mxjob when it is created. MXJobReasonCreated = "MXJobCreated" // MXJobReasonInitialized is added in a mxjob when it is initialized. MXJobReasonInitialized = "MXJobInitialized" // MXJobReasonSucceeded is added in a mxjob when it is succeeded. MXJobReasonSucceeded = "MXJobSucceeded" // MXJobReasonRunning is added in a mxjob when it is running. MXJobReasonRunning = "MXJobRunning" // MXJobReasonFailed is added in a mxjob when it is failed. MXJobReasonFailed = "MXJobFailed" )
const (
// FinalizerFinishWebhook is a finalizer for calling finish webhook.
FinalizerFinishWebhook = "finishWebhook"
)
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme // SchemeGroupVersion is the group version used to register these objects. SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: version} SchemeGroupVersionKind = SchemeGroupVersion.WithKind(kind) )
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
Types ¶
type MXJob ¶
type MXJob struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec MXJobSpec `json:"spec"`
Status MXJobStatus `json:"status,omitempty"`
}
func (*MXJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJob.
func (*MXJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MXJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MXJobCondition ¶
type MXJobCondition struct {
// Type of MXJob condition.
Type MXJobConditionType `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 MXJobReason `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"`
}
MXJobCondition describes the state of the MXJob at a certain point.
func (*MXJobCondition) DeepCopy ¶
func (in *MXJobCondition) DeepCopy() *MXJobCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobCondition.
func (*MXJobCondition) DeepCopyInto ¶
func (in *MXJobCondition) DeepCopyInto(out *MXJobCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MXJobConditionType ¶
type MXJobConditionType string
MXJobConditionType defines all kinds of types of MXJobStatus.
const ( // MXJobCreated means the mxjob 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. MXJobCreated MXJobConditionType = "Created" // MXJobInitialized means all sub-resources (e.g. services/pods) of this MXJob // have been successfully created. // The training is starting to run. MXJobInitialized MXJobConditionType = "Initialized" // MXJobRunning means all sub-resources (e.g. services/pods) of this MXJob // have been successfully scheduled and launched. // The training is running without error. MXJobRunning MXJobConditionType = "Running" // MXJobRestarting means one or more sub-resources (e.g. services/pods) of this MXJob // reached phase failed but maybe restarted according to it's restart policy // which specified by user in v1.PodTemplateSpec. // The training is freezing/pending. MXJobRestarting MXJobConditionType = "Restarting" // MXJobSucceeded means all sub-resources (e.g. services/pods) of this MXJob // reached phase have terminated in success. // The training is complete without error. MXJobSucceeded MXJobConditionType = "Succeeded" // MXJobFailed means one or more sub-resources (e.g. services/pods) of this MXJob // reached phase failed with no restarting. // The training has failed its execution. MXJobFailed MXJobConditionType = "Failed" )
type MXJobList ¶
type MXJobList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []MXJob `json:"items"`
}
func (*MXJobList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobList.
func (*MXJobList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MXJobList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MXJobPhase ¶
type MXJobPhase string
MXJobPhase is the mxnet job phase
const ( // MXJobPhaseNone job phase none MXJobPhaseNone MXJobPhase = "" // MXJobPhaseCreating job phase creating MXJobPhaseCreating MXJobPhase = "Creating" // MXJobPhaseRunning job phase running MXJobPhaseRunning MXJobPhase = "Running" // MXJobPhaseCleanUp job phase cleanup MXJobPhaseCleanUp MXJobPhase = "CleanUp" // MXJobPhaseFailed job phase failed MXJobPhaseFailed MXJobPhase = "Failed" // MXJobPhaseDone job phase done MXJobPhaseDone MXJobPhase = "Done" )
type MXJobSpec ¶
type MXJobSpec struct {
// MXReplicaSpecs is map of MXReplicaType and MXReplicaSpec
// specifies the MX replicas to run.
// For example,
// {
// "scheduler": MXReplicaSpec,
// "server": MXReplicaSpec,
// "worker": MXReplicaSpe,
// }
MXReplicaSpecs MXReplicaSpecs `json:"replicaSpecs"`
// StartWebhook describes a notification webhook when MXJob started.
StartWebhook *Webhook `json:"startWebhook,omitempty"`
// FinishWebhook describes a notification webhook when MXJob finished.
FinishWebhook *Webhook `json:"finishWebhook,omitempty"`
}
MXJobSpec is a desired state description of the MXJob.
func (*MXJobSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobSpec.
func (*MXJobSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MXJobStatus ¶
type MXJobStatus struct {
// ReplicaStatuses specifies the status of each MX replica.
ReplicaStatuses MXReplicaStatuses `json:"replicaStatuses"`
// Represents time when the MXJob was acknowledged by the MXJob 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 MXJob 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 is an array of current observed MXJob conditions.
Conditions []MXJobCondition `json:"conditions"`
}
func (*MXJobStatus) DeepCopy ¶
func (in *MXJobStatus) DeepCopy() *MXJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobStatus.
func (*MXJobStatus) DeepCopyInto ¶
func (in *MXJobStatus) DeepCopyInto(out *MXJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MXReplicaSpec ¶
type MXReplicaSpec struct {
// Replicas is the number of desired replicas.
Replicas *int32 `json:"replicas,omitempty"`
Template *v1.PodTemplateSpec `json:"template,omitempty"`
// PsRootPort is the port to use for scheduler.
PsRootPort *int32 `json:"psRootPort,omitempty"`
// PsVerbose is the communication loggining level.
PsVerbose *int32 `json:"psVerbose,omitempty"`
}
func (*MXReplicaSpec) DeepCopy ¶
func (in *MXReplicaSpec) DeepCopy() *MXReplicaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXReplicaSpec.
func (*MXReplicaSpec) DeepCopyInto ¶
func (in *MXReplicaSpec) DeepCopyInto(out *MXReplicaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MXReplicaSpecs ¶
type MXReplicaSpecs struct {
// ReplicaSpecs specifies the MX scheduler replicas to run.
Scheduler *MXReplicaSpec `json:"scheduler,omitempty"`
// ReplicaSpecs specifies the MX server replicas to run.
Server *MXReplicaSpec `json:"server,omitempty"`
// ReplicaSpecs specifies the MX worker replicas to run.
Worker *MXReplicaSpec `json:"worker,omitempty"`
}
func (*MXReplicaSpecs) DeepCopy ¶
func (in *MXReplicaSpecs) DeepCopy() *MXReplicaSpecs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXReplicaSpecs.
func (*MXReplicaSpecs) DeepCopyInto ¶
func (in *MXReplicaSpecs) DeepCopyInto(out *MXReplicaSpecs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MXReplicaStatus ¶
type MXReplicaStatus 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"`
// The number of pods which is deleted.
Gone int32 `json:"gone,omitempty"`
}
MXReplicaStatus mxnet replica status
func (*MXReplicaStatus) DeepCopy ¶
func (in *MXReplicaStatus) DeepCopy() *MXReplicaStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXReplicaStatus.
func (*MXReplicaStatus) DeepCopyInto ¶
func (in *MXReplicaStatus) DeepCopyInto(out *MXReplicaStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MXReplicaStatuses ¶
type MXReplicaStatuses struct {
Scheduler *MXReplicaStatus `json:"scheduler,omitempty"`
Server *MXReplicaStatus `json:"server,omitempty"`
Worker *MXReplicaStatus `json:"worker,omitempty"`
}
MXReplicaStatuses is the status collection of mxnet replica.
func (*MXReplicaStatuses) DeepCopy ¶
func (in *MXReplicaStatuses) DeepCopy() *MXReplicaStatuses
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXReplicaStatuses.
func (*MXReplicaStatuses) DeepCopyInto ¶
func (in *MXReplicaStatuses) DeepCopyInto(out *MXReplicaStatuses)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MXReplicaType ¶
type MXReplicaType string
MXReplicaType determines how a set of MX processes are handled.
const ( // scheduler mxnet training job replica type MXReplicaTypeScheduler MXReplicaType = "scheduler" // server mxnet training job replica type MXReplicaTypeServer MXReplicaType = "server" // worker mxnet training job replica type MXReplicaTypeWorker MXReplicaType = "worker" )
type Notification ¶
type Notification struct {
metav1.TypeMeta `json:",inline"`
// Request describes the attributes for the notification request.
Request *NotificationRequest `json:"request,omitempty"`
// Response describes the attributes for the notification response.
Response *NotificationResponse `json:"response,omitempty"`
}
func (*Notification) DeepCopy ¶
func (in *Notification) DeepCopy() *Notification
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Notification.
func (*Notification) DeepCopyInto ¶
func (in *Notification) DeepCopyInto(out *Notification)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Notification) DeepCopyObject ¶
func (in *Notification) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NotificationRequest ¶
type NotificationRequest struct {
// UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
UID types.UID `json:"uid"`
// Kind is the type of object MXJob.
Kind metav1.GroupVersionKind `json:"kind"`
// Name is the name of the object as presented in the request.
Name string `json:"name"`
// Namespace is the namespace associated with the request.
Namespace string `json:"namespace"`
// Status is the current MXJobStatus at the notification time.
Status MXJobStatus `json:"status,omitempty"`
// DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted.
DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty"`
}
NotificationRequest describes the attributes for the notification webhook request.
func (*NotificationRequest) DeepCopy ¶
func (in *NotificationRequest) DeepCopy() *NotificationRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationRequest.
func (*NotificationRequest) DeepCopyInto ¶
func (in *NotificationRequest) DeepCopyInto(out *NotificationRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NotificationResponse ¶
type NotificationResponse struct {
// UID is an identifier for the individual request/response.
// This should be copied over from the corresponding NotificationRequest.
UID types.UID `json:"uid"`
// Result contains extra details.
Result *metav1.Status `json:"status,omitempty"`
}
NotificationResponse describes the attributes for the notification webhook response.
func (*NotificationResponse) DeepCopy ¶
func (in *NotificationResponse) DeepCopy() *NotificationResponse
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationResponse.
func (*NotificationResponse) DeepCopyInto ¶
func (in *NotificationResponse) DeepCopyInto(out *NotificationResponse)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Webhook ¶
type Webhook struct {
// The name of the admission webhook.
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
// of the organization.
Name string
// ClientConfig defines how to communicate with the hook.
// Use common structure in admissionregistration.
ClientConfig admission.WebhookClientConfig `json:"clientConfig"`
}
func (*Webhook) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook.
func (*Webhook) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.