Skip to content

Commit

Permalink
Merge pull request #794 from hzxuzhonghu/automated-cherry-pick-of-#78…
Browse files Browse the repository at this point in the history
…6-origin-release-0.4

Automated cherry pick of #786: Fix Job crd definition to support job patch
  • Loading branch information
volcano-sh-bot authored May 8, 2020
2 parents c5c2534 + 01ad8b5 commit 2275754
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ spec:
description: Unique, one-word, CamelCase reason for the condition's
last transition.
type: string
lastTransitionTime:
description: The time of last state transition.
format: date-time
type: string
type: object
type: object
version: v1alpha1
Expand Down
4 changes: 4 additions & 0 deletions installer/volcano-development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,10 @@ spec:
description: Unique, one-word, CamelCase reason for the condition's
last transition.
type: string
lastTransitionTime:
description: The time of last state transition.
format: date-time
type: string
type: object
type: object
version: v1alpha1
Expand Down
1 change: 1 addition & 0 deletions pkg/controllers/job/job_controller_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ func (cc *Controller) initJobStatus(job *batch.Job) (*batch.Job, error) {
}

job.Status.State.Phase = batch.Pending
job.Status.State.LastTransitionTime = metav1.Now()
job.Status.MinAvailable = job.Spec.MinAvailable
newJob, err := cc.vcClient.BatchV1alpha1().Jobs(job.Namespace).UpdateStatus(job)
if err != nil {
Expand Down

0 comments on commit 2275754

Please sign in to comment.