Skip to content

Commit

Permalink
Merge pull request #786 from hzxuzhonghu/fic-crd
Browse files Browse the repository at this point in the history
fix crd to support job patch ops
  • Loading branch information
volcano-sh-bot authored Apr 30, 2020
2 parents 4afb0c3 + 7f30b15 commit 36cffca
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 @@ -556,6 +556,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 @@ -542,6 +542,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 36cffca

Please sign in to comment.