Fix golint errors in pkg/controller/job

This commit is contained in:
Mario Valderrama
2019-06-12 20:09:57 +02:00
parent 56b40066d5
commit dbbe68601f
6 changed files with 53 additions and 50 deletions

View File

@@ -21,6 +21,8 @@ import (
"k8s.io/api/core/v1"
)
// IsJobFinished checks whether the given Job has finished execution.
// It does not discriminate between successful and failed terminations.
func IsJobFinished(j *batch.Job) bool {
for _, c := range j.Status.Conditions {
if (c.Type == batch.JobComplete || c.Type == batch.JobFailed) && c.Status == v1.ConditionTrue {