mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Update batch types.go documentation strings
This commit is contained in:
parent
19d722671b
commit
4b57a25730
@ -31,12 +31,12 @@ type Job struct {
|
||||
// +optional
|
||||
metav1.ObjectMeta
|
||||
|
||||
// Spec is a structure defining the expected behavior of a job.
|
||||
// Specification of the desired behavior of a job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec JobSpec
|
||||
|
||||
// Status is a structure describing current status of a job.
|
||||
// Current status of a job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status JobStatus
|
||||
@ -45,12 +45,12 @@ type Job struct {
|
||||
// JobList is a collection of jobs.
|
||||
type JobList struct {
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata
|
||||
// Standard list metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of Job.
|
||||
// items is the list of Jobs.
|
||||
Items []Job
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ type JobTemplate struct {
|
||||
// +optional
|
||||
metav1.ObjectMeta
|
||||
|
||||
// Template defines jobs that will be created from this template
|
||||
// Defines jobs that will be created from this template.
|
||||
// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Template JobTemplateSpec
|
||||
@ -84,14 +84,14 @@ type JobTemplateSpec struct {
|
||||
// JobSpec describes how the job execution will look like.
|
||||
type JobSpec struct {
|
||||
|
||||
// Parallelism specifies the maximum desired number of pods the job should
|
||||
// Specifies the maximum desired number of pods the job should
|
||||
// run at any given time. The actual number of pods running in steady state will
|
||||
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
||||
// i.e. when the work left to do is less than max parallelism.
|
||||
// +optional
|
||||
Parallelism *int32
|
||||
|
||||
// Completions specifies the desired number of successfully finished pods the
|
||||
// Specifies the desired number of successfully finished pods the
|
||||
// job should be run with. Setting to nil means that the success of any
|
||||
// pod signals the success of all pods, and allows parallelism to have any positive
|
||||
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
||||
@ -104,12 +104,12 @@ type JobSpec struct {
|
||||
// +optional
|
||||
ActiveDeadlineSeconds *int64
|
||||
|
||||
// Selector is a label query over pods that should match the pod count.
|
||||
// A label query over pods that should match the pod count.
|
||||
// Normally, the system sets this field for you.
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector
|
||||
|
||||
// ManualSelector controls generation of pod labels and pod selectors.
|
||||
// manualSelector controls generation of pod labels and pod selectors.
|
||||
// Leave `manualSelector` unset unless you are certain what you are doing.
|
||||
// When false or unset, the system pick labels unique to this job
|
||||
// and appends those labels to the pod template. When true,
|
||||
@ -121,39 +121,38 @@ type JobSpec struct {
|
||||
// +optional
|
||||
ManualSelector *bool
|
||||
|
||||
// Template is the object that describes the pod that will be created when
|
||||
// executing a job.
|
||||
// Describes the pod that will be created when executing a job.
|
||||
Template api.PodTemplateSpec
|
||||
}
|
||||
|
||||
// JobStatus represents the current state of a Job.
|
||||
type JobStatus struct {
|
||||
|
||||
// Conditions represent the latest available observations of an object's current state.
|
||||
// The latest available observations of an object's current state.
|
||||
// +optional
|
||||
Conditions []JobCondition
|
||||
|
||||
// StartTime represents time when the job was acknowledged by the Job Manager.
|
||||
// Represents time when the job was acknowledged by the job 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.
|
||||
// +optional
|
||||
StartTime *metav1.Time
|
||||
|
||||
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
||||
// Represents time when the job 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.
|
||||
// +optional
|
||||
CompletionTime *metav1.Time
|
||||
|
||||
// Active is the number of actively running pods.
|
||||
// The number of actively running pods.
|
||||
// +optional
|
||||
Active int32
|
||||
|
||||
// Succeeded is the number of pods which reached Phase Succeeded.
|
||||
// The number of pods which reached phase Succeeded.
|
||||
// +optional
|
||||
Succeeded int32
|
||||
|
||||
// Failed is the number of pods which reached Phase Failed.
|
||||
// The number of pods which reached phase Failed.
|
||||
// +optional
|
||||
Failed int32
|
||||
}
|
||||
@ -198,12 +197,12 @@ type CronJob struct {
|
||||
// +optional
|
||||
metav1.ObjectMeta
|
||||
|
||||
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
||||
// Specification of the desired behavior of a cron job, including the schedule.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec CronJobSpec
|
||||
|
||||
// Status is a structure describing current status of a job.
|
||||
// Current status of a cron job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status CronJobStatus
|
||||
@ -212,19 +211,19 @@ type CronJob struct {
|
||||
// CronJobList is a collection of cron jobs.
|
||||
type CronJobList struct {
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata
|
||||
// Standard list metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of CronJob.
|
||||
// items is the list of CronJobs.
|
||||
Items []CronJob
|
||||
}
|
||||
|
||||
// CronJobSpec describes how the job execution will look like and when it will actually run.
|
||||
type CronJobSpec struct {
|
||||
|
||||
// Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
Schedule string
|
||||
|
||||
// Optional deadline in seconds for starting the job if it misses scheduled
|
||||
@ -232,18 +231,17 @@ type CronJobSpec struct {
|
||||
// +optional
|
||||
StartingDeadlineSeconds *int64
|
||||
|
||||
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
||||
// Specifies how to treat concurrent executions of a Job.
|
||||
// Defaults to Allow.
|
||||
// +optional
|
||||
ConcurrencyPolicy ConcurrencyPolicy
|
||||
|
||||
// Suspend flag tells the controller to suspend subsequent executions, it does
|
||||
// This flag tells the controller to suspend subsequent executions, it does
|
||||
// not apply to already started executions. Defaults to false.
|
||||
// +optional
|
||||
Suspend *bool
|
||||
|
||||
// JobTemplate is the object that describes the job that will be created when
|
||||
// executing a CronJob.
|
||||
// Specifies the job that will be created when executing a CronJob.
|
||||
JobTemplate JobTemplateSpec
|
||||
|
||||
// The number of successful finished jobs to retain.
|
||||
@ -277,11 +275,11 @@ const (
|
||||
|
||||
// CronJobStatus represents the current state of a cron job.
|
||||
type CronJobStatus struct {
|
||||
// Active holds pointers to currently running jobs.
|
||||
// A list of pointers to currently running jobs.
|
||||
// +optional
|
||||
Active []api.ObjectReference
|
||||
|
||||
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
||||
// Information when was the last time the job was successfully scheduled.
|
||||
// +optional
|
||||
LastScheduleTime *metav1.Time
|
||||
}
|
||||
|
@ -31,12 +31,12 @@ type Job struct {
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec is a structure defining the expected behavior of a job.
|
||||
// Specification of the desired behavior of a job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
|
||||
// Status is a structure describing current status of a job.
|
||||
// Current status of a job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
@ -45,19 +45,19 @@ type Job struct {
|
||||
// JobList is a collection of jobs.
|
||||
type JobList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata
|
||||
// Standard list metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of Job.
|
||||
// items is the list of Jobs.
|
||||
Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// JobSpec describes how the job execution will look like.
|
||||
type JobSpec struct {
|
||||
|
||||
// Parallelism specifies the maximum desired number of pods the job should
|
||||
// Specifies the maximum desired number of pods the job should
|
||||
// run at any given time. The actual number of pods running in steady state will
|
||||
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
||||
// i.e. when the work left to do is less than max parallelism.
|
||||
@ -65,7 +65,7 @@ type JobSpec struct {
|
||||
// +optional
|
||||
Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
||||
|
||||
// Completions specifies the desired number of successfully finished pods the
|
||||
// Specifies the desired number of successfully finished pods the
|
||||
// job should be run with. Setting to nil means that the success of any
|
||||
// pod signals the success of all pods, and allows parallelism to have any positive
|
||||
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
||||
@ -79,13 +79,13 @@ type JobSpec struct {
|
||||
// +optional
|
||||
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
|
||||
|
||||
// Selector is a label query over pods that should match the pod count.
|
||||
// A label query over pods that should match the pod count.
|
||||
// Normally, the system sets this field for you.
|
||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
|
||||
|
||||
// ManualSelector controls generation of pod labels and pod selectors.
|
||||
// manualSelector controls generation of pod labels and pod selectors.
|
||||
// Leave `manualSelector` unset unless you are certain what you are doing.
|
||||
// When false or unset, the system pick labels unique to this job
|
||||
// and appends those labels to the pod template. When true,
|
||||
@ -98,8 +98,7 @@ type JobSpec struct {
|
||||
// +optional
|
||||
ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
|
||||
|
||||
// Template is the object that describes the pod that will be created when
|
||||
// executing a job.
|
||||
// Describes the pod that will be created when executing a job.
|
||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||
Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"`
|
||||
}
|
||||
@ -107,34 +106,34 @@ type JobSpec struct {
|
||||
// JobStatus represents the current state of a Job.
|
||||
type JobStatus struct {
|
||||
|
||||
// Conditions represent the latest available observations of an object's current state.
|
||||
// The latest available observations of an object's current state.
|
||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||
|
||||
// StartTime represents time when the job was acknowledged by the Job Manager.
|
||||
// Represents time when the job was acknowledged by the job 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.
|
||||
// +optional
|
||||
StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
||||
|
||||
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
||||
// Represents time when the job 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.
|
||||
// +optional
|
||||
CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
||||
|
||||
// Active is the number of actively running pods.
|
||||
// The number of actively running pods.
|
||||
// +optional
|
||||
Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
|
||||
|
||||
// Succeeded is the number of pods which reached Phase Succeeded.
|
||||
// The number of pods which reached phase Succeeded.
|
||||
// +optional
|
||||
Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
|
||||
|
||||
// Failed is the number of pods which reached Phase Failed.
|
||||
// The number of pods which reached phase Failed.
|
||||
// +optional
|
||||
Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ type JobTemplate struct {
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Template defines jobs that will be created from this template
|
||||
// Defines jobs that will be created from this template.
|
||||
// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
|
||||
@ -59,12 +59,12 @@ type CronJob struct {
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
||||
// Specification of the desired behavior of a cron job, including the schedule.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
|
||||
// Status is a structure describing current status of a job.
|
||||
// Current status of a cron job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
@ -73,19 +73,19 @@ type CronJob struct {
|
||||
// CronJobList is a collection of cron jobs.
|
||||
type CronJobList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata
|
||||
// Standard list metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of CronJob.
|
||||
// items is the list of CronJobs.
|
||||
Items []CronJob `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// CronJobSpec describes how the job execution will look like and when it will actually run.
|
||||
type CronJobSpec struct {
|
||||
|
||||
// Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
|
||||
|
||||
// Optional deadline in seconds for starting the job if it misses scheduled
|
||||
@ -93,18 +93,17 @@ type CronJobSpec struct {
|
||||
// +optional
|
||||
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
|
||||
|
||||
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
||||
// Specifies how to treat concurrent executions of a Job.
|
||||
// Defaults to Allow.
|
||||
// +optional
|
||||
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
|
||||
|
||||
// Suspend flag tells the controller to suspend subsequent executions, it does
|
||||
// This flag tells the controller to suspend subsequent executions, it does
|
||||
// not apply to already started executions. Defaults to false.
|
||||
// +optional
|
||||
Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
|
||||
|
||||
// JobTemplate is the object that describes the job that will be created when
|
||||
// executing a CronJob.
|
||||
// Specifies the job that will be created when executing a CronJob.
|
||||
JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
|
||||
|
||||
// The number of successful finished jobs to retain.
|
||||
@ -138,11 +137,11 @@ const (
|
||||
|
||||
// CronJobStatus represents the current state of a cron job.
|
||||
type CronJobStatus struct {
|
||||
// Active holds pointers to currently running jobs.
|
||||
// A list of pointers to currently running jobs.
|
||||
// +optional
|
||||
Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
|
||||
|
||||
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
||||
// Information when was the last time the job was successfully scheduled.
|
||||
// +optional
|
||||
LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user