From 34e3b3b477bed42f095f73fdc3d754b784a80cf0 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Mon, 15 Dec 2025 20:39:15 +0000 Subject: [PATCH] Add pull policy to run container task Signed-off-by: Simon Emms --- dsl-reference.md | 2 ++ examples/run-container-with-pull-policy.yaml | 11 +++++++++++ schema/workflow.yaml | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 examples/run-container-with-pull-policy.yaml diff --git a/dsl-reference.md b/dsl-reference.md index 71dfe1af..d82bd310 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -931,6 +931,7 @@ Enables the execution of external processes encapsulated within a containerized | stdin | `string` | `no` | A runtime expression, if any, passed as standard input to the command or default container CMD| | arguments | `string[]` | `no` | A list of the arguments, if any, passed as argv to the command or default container CMD | | lifetime | [`containerLifetime`](#container-lifetime) | `no` | An object used to configure the container's lifetime. | +| pullPolicy | `string` | `no` | Policy that controls how the container's image should be pulled from the registry. Defaults to `ifNotPresent` | ###### Examples @@ -958,6 +959,7 @@ do: arguments: - Foo - Bar + pullPolicy: always ``` > [!NOTE] diff --git a/examples/run-container-with-pull-policy.yaml b/examples/run-container-with-pull-policy.yaml new file mode 100644 index 00000000..393e402b --- /dev/null +++ b/examples/run-container-with-pull-policy.yaml @@ -0,0 +1,11 @@ +document: + dsl: '1.0.2' + namespace: test + name: run-container-with-pull-policy + version: '0.1.0' +do: + - runContainer: + run: + container: + image: hello-world + pullPolicy: always \ No newline at end of file diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 40569a4a..da8fce14 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -823,6 +823,11 @@ $defs: $ref: '#/$defs/containerLifetime' title: ContainerLifetime description: An object, if any, used to configure the container's lifetime + pullPolicy: + type: string + title: ContainerPullPolicy + description: Policy that controls how the container's image should be pulled from the registry. Defaults to `ifNotPresent` + enum: [ ifNotPresent, always, never ] required: [ image ] required: [ container ] - title: RunScript