Skip to content

Commit

Permalink
feat(controller): Add podMetadata field to workflow spec. Resolves #4985
Browse files Browse the repository at this point in the history
 (#5031)

Signed-off-by: Dylan Hellems <dylanhellems@gmail.com>
  • Loading branch information
dylanhellems committed Feb 10, 2021
1 parent 3b63e7d commit f461b04
Show file tree
Hide file tree
Showing 15 changed files with 770 additions and 763 deletions.
8 changes: 8 additions & 0 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5280,6 +5280,10 @@
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.PodGC",
"description": "PodGC describes the strategy to use when to deleting completed pods"
},
"podMetadata": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Metadata",
"description": "PodMetadata defines additional metadata that should be applied to workflow pods"
},
"podPriority": {
"description": "Priority to apply to workflow pods.",
"type": "integer"
Expand Down Expand Up @@ -5744,6 +5748,10 @@
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.PodGC",
"description": "PodGC describes the strategy to use when to deleting completed pods"
},
"podMetadata": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Metadata",
"description": "PodMetadata defines additional metadata that should be applied to workflow pods"
},
"podPriority": {
"description": "Priority to apply to workflow pods.",
"type": "integer"
Expand Down
8 changes: 8 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -8691,6 +8691,10 @@
"description": "PodGC describes the strategy to use when to deleting completed pods",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.PodGC"
},
"podMetadata": {
"description": "PodMetadata defines additional metadata that should be applied to workflow pods",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Metadata"
},
"podPriority": {
"description": "Priority to apply to workflow pods.",
"type": "integer"
Expand Down Expand Up @@ -9153,6 +9157,10 @@
"description": "PodGC describes the strategy to use when to deleting completed pods",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.PodGC"
},
"podMetadata": {
"description": "PodMetadata defines additional metadata that should be applied to workflow pods",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Metadata"
},
"podPriority": {
"description": "Priority to apply to workflow pods.",
"type": "integer"
Expand Down
342 changes: 45 additions & 297 deletions docs/fields.md

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions examples/pod-metadata-wf-field.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This template demonstrates how pod annotations and labels may be set at the workflow level for all pods
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: steps-
spec:
entrypoint: hello-hello-hello

podMetadata:
annotations:
iam.amazonaws.com/role: role-arn
labels:
app: whalesay
tier: demo

templates:
- name: hello-hello-hello
steps:
- - name: hello1
template: whalesay
arguments:
parameters:
- name: message
value: "hello1"

- name: whalesay
inputs:
parameters:
- name: message
container:
image: docker/whalesay
command: [cowsay]
args: ["{{inputs.parameters.message}}"]
11 changes: 11 additions & 0 deletions manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,17 @@ spec:
strategy:
type: string
type: object
podMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
podPriority:
format: int32
type: integer
Expand Down
11 changes: 11 additions & 0 deletions manifests/base/crds/full/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,17 @@ spec:
strategy:
type: string
type: object
podMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
podPriority:
format: int32
type: integer
Expand Down
22 changes: 22 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,17 @@ spec:
strategy:
type: string
type: object
podMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
podPriority:
format: int32
type: integer
Expand Down Expand Up @@ -13920,6 +13931,17 @@ spec:
strategy:
type: string
type: object
podMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
podPriority:
format: int32
type: integer
Expand Down
11 changes: 11 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,17 @@ spec:
strategy:
type: string
type: object
podMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
podPriority:
format: int32
type: integer
Expand Down
Loading

0 comments on commit f461b04

Please sign in to comment.