Merge pull request #87919 from SomtochiAma/update-api-docs

Adds additional documentation for job status
This commit is contained in:
Kubernetes Prow Robot 2020-08-27 01:19:02 -07:00 committed by GitHub
commit 1814612d34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 4 deletions

View File

@ -4005,10 +4005,10 @@
}, },
"completionTime": { "completionTime": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time",
"description": "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." "description": "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. The completion time is only set when the job finishes successfully."
}, },
"conditions": { "conditions": {
"description": "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", "description": "The latest available observations of an object's current state. When a job fails, one of the conditions will have type == \"Failed\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
"items": { "items": {
"$ref": "#/definitions/io.k8s.api.batch.v1.JobCondition" "$ref": "#/definitions/io.k8s.api.batch.v1.JobCondition"
}, },

View File

@ -155,6 +155,7 @@ type JobSpec struct {
type JobStatus struct { type JobStatus struct {
// The latest available observations of an object's current state. // The latest available observations of an object's current state.
// When a job fails, one of the conditions will have type == "Failed".
// +optional // +optional
Conditions []JobCondition Conditions []JobCondition
@ -167,6 +168,7 @@ type JobStatus struct {
// 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. // be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC. // It is represented in RFC3339 form and is in UTC.
// The completion time is only set when the job finishes successfully.
// +optional // +optional
CompletionTime *metav1.Time CompletionTime *metav1.Time

View File

@ -151,6 +151,7 @@ message JobSpec {
// JobStatus represents the current state of a Job. // JobStatus represents the current state of a Job.
message JobStatus { message JobStatus {
// The latest available observations of an object's current state. // The latest available observations of an object's current state.
// When a job fails, one of the conditions will have type == "Failed".
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
// +optional // +optional
// +patchMergeKey=type // +patchMergeKey=type
@ -166,6 +167,7 @@ message JobStatus {
// 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. // be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC. // It is represented in RFC3339 form and is in UTC.
// The completion time is only set when the job finishes successfully.
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3; optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3;

View File

@ -131,6 +131,7 @@ type JobSpec struct {
// JobStatus represents the current state of a Job. // JobStatus represents the current state of a Job.
type JobStatus struct { type JobStatus struct {
// The latest available observations of an object's current state. // The latest available observations of an object's current state.
// When a job fails, one of the conditions will have type == "Failed".
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
// +optional // +optional
// +patchMergeKey=type // +patchMergeKey=type
@ -146,6 +147,7 @@ type JobStatus struct {
// 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. // be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC. // It is represented in RFC3339 form and is in UTC.
// The completion time is only set when the job finishes successfully.
// +optional // +optional
CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`

View File

@ -80,9 +80,9 @@ func (JobSpec) SwaggerDoc() map[string]string {
var map_JobStatus = map[string]string{ var map_JobStatus = map[string]string{
"": "JobStatus represents the current state of a Job.", "": "JobStatus represents the current state of a Job.",
"conditions": "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", "conditions": "The latest available observations of an object's current state. When a job fails, one of the conditions will have type == \"Failed\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
"startTime": "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.", "startTime": "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.",
"completionTime": "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.", "completionTime": "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. The completion time is only set when the job finishes successfully.",
"active": "The number of actively running pods.", "active": "The number of actively running pods.",
"succeeded": "The number of pods which reached phase Succeeded.", "succeeded": "The number of pods which reached phase Succeeded.",
"failed": "The number of pods which reached phase Failed.", "failed": "The number of pods which reached phase Failed.",