Browse Source

support running job manually from cli'

Alexander Belanger 4 years ago
parent
commit
4104b288ef
1 changed files with 3 additions and 2 deletions
  1. 3 2
      cli/cmd/deploy/deploy.go

+ 3 - 2
cli/cmd/deploy/deploy.go

@@ -278,8 +278,9 @@ func (d *DeployAgent) UpdateImageAndValues(overrideValues map[string]interface{}
 	// overwrite the tag based on a new image
 	currImageSection := mergedValues["image"].(map[string]interface{})
 
-	// if this is a job chart, set "paused" to false so that the job doesn't run
-	if d.release.Chart.Name() == "job" {
+	// if this is a job chart, set "paused" to false so that the job doesn't run, unless
+	// the user has explicitly overriden the "paused" field
+	if _, exists := overrideValues["paused"]; d.release.Chart.Name() == "job" && !exists {
 		mergedValues["paused"] = true
 	}