diff --git a/model/task_run.go b/model/task_run.go index b7a3f76..bbdc00d 100644 --- a/model/task_run.go +++ b/model/task_run.go @@ -46,6 +46,7 @@ type Container struct { Environment map[string]string `json:"environment,omitempty"` Input string `json:"stdin,omitempty"` Arguments []string `json:"arguments,omitempty"` + PullPolicy string `json:"pullPolicy,omitempty" validate:"oneof=ifNotPresent always never"` Lifetime *ContainerLifetime `json:"lifetime,omitempty"` } diff --git a/model/task_run_test.go b/model/task_run_test.go index 554de6b..5da7b87 100644 --- a/model/task_run_test.go +++ b/model/task_run_test.go @@ -50,6 +50,7 @@ func TestRunTask_MarshalJSON(t *testing.T) { "arg1", "arg2", }, + PullPolicy: "always", Lifetime: &ContainerLifetime{ Cleanup: "eventually", After: NewDurationExpr("20s"), @@ -77,6 +78,7 @@ func TestRunTask_MarshalJSON(t *testing.T) { "environment": {"ENV_VAR": "value"}, "stdin": "example-input", "arguments": ["arg1","arg2"], + "pullPolicy": "always", "lifetime": { "cleanup": "eventually", "after": "20s"