@@ -317,6 +317,12 @@ type JobStatus struct {
317
317
// The resources that controlled by this job, e.g. Service, ConfigMap
318
318
// +optional
319
319
ControlledResources map [string ]string `json:"controlledResources,omitempty" protobuf:"bytes,11,opt,name=controlledResources"`
320
+
321
+ // Which conditions caused the current job state.
322
+ // +optional
323
+ // +patchMergeKey=status
324
+ // +patchStrategy=merge
325
+ Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"status" protobuf:"bytes,12,rep,name=conditions"`
320
326
}
321
327
322
328
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -329,3 +335,12 @@ type JobList struct {
329
335
330
336
Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"`
331
337
}
338
+
339
+ // JobCondition contains details for the current condition of this job.
340
+ type JobCondition struct {
341
+ // Status is the new phase of job after performing the state's action.
342
+ Status JobPhase `json:"status" protobuf:"bytes,1,opt,name=status,casttype=JobPhase"`
343
+ // Last time the condition transitioned from one phase to another.
344
+ // +optional
345
+ LastTransitionTime * metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,2,opt,name=lastTransitionTime"`
346
+ }
0 commit comments