Skip to content

Commit 09ba72e

Browse files
docs: document allowed fields when templateReferencing enabled (cherry-pick argoproj#16024 for 4.0) (argoproj#16048)
Signed-off-by: Alan Clucas <alan@clucas.org> Co-authored-by: Alan Clucas <alan@clucas.org>
1 parent 9be7e26 commit 09ba72e

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

docs/workflow-restrictions.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,31 @@ Workflow Restrictions allow you to set requirements for all Workflows.
1212
* `templateReferencing: Strict`: Only process Workflows using `workflowTemplateRef`. You can use this to require usage of WorkflowTemplates, disallowing arbitrary Workflow execution.
1313
* `templateReferencing: Secure`: Same as `Strict` _plus_ enforce that a referenced WorkflowTemplate hasn't changed between operations. If a running Workflow's underlying WorkflowTemplate changes, the Workflow will error out.
1414

15+
## Allowed Workflow Fields Under `templateReferencing`
16+
17+
When `templateReferencing` is set to `Strict` or `Secure`, the submitted `Workflow` may only set fields that are explicitly allowed on top of the referenced `WorkflowTemplate`. Any other field present on the submission is rejected and the Workflow errors out.
18+
19+
This prevents users from overriding security-sensitive fields defined in the `WorkflowTemplate` (such as `serviceAccountName`, `securityContext`, `volumes`, `hostNetwork`, `podSpecPatch`, or injecting additional `templates`) via their submission.
20+
21+
The allow-listed fields are:
22+
23+
* `arguments`
24+
* `entrypoint`
25+
* `shutdown`
26+
* `suspend`
27+
* `activeDeadlineSeconds`
28+
* `priority`
29+
* `ttlStrategy`
30+
* `podGC`
31+
* `volumeClaimGC`
32+
* `archiveLogs`
33+
* `workflowMetadata`
34+
* `workflowTemplateRef`
35+
* `metrics`
36+
* `artifactGC`
37+
38+
All other fields on the submitted `Workflow` spec must be defined on the referenced `WorkflowTemplate` instead.
39+
1540
## Setting Workflow Restrictions
1641

1742
You can add `workflowRestrictions` in the [`workflow-controller-configmap`](./workflow-controller-configmap.yaml).

0 commit comments

Comments
 (0)