-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/daemon-retry-strategy
- Loading branch information
Showing
53 changed files
with
1,052 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Annotations | ||
|
||
Argo Workflows now supports annotations as a new field in workflow templates. | ||
|
||
## Adding Annotations to a template | ||
|
||
To add annotations to a workflow template, include the `annotations` field in template definition, for example: | ||
|
||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: example-workflow-template | ||
spec: | ||
entrypoint: whalesay | ||
templates: | ||
- name: whalesay | ||
annotations: | ||
workflows.argoproj.io/display-name: "my-custom-display-name" | ||
container: | ||
image: docker/whalesay | ||
command: [cowsay] | ||
args: ["hello world"] | ||
``` | ||
|
||
In this example, the annotation `workflows.argoproj.io/display-name` is used to change the node name in the UI to "my-custom-display-name". | ||
|
||
## Annotation Templates | ||
|
||
Annotations can also be created dynamically using parameters. This allows you to dynamically set annotation values based on input parameters. | ||
|
||
Here is an example: | ||
|
||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: templated-annotations-workflow | ||
spec: | ||
entrypoint: whalesay | ||
arguments: | ||
parameters: | ||
- name: display-name | ||
value: "default-display-name" | ||
templates: | ||
- name: whalesay | ||
annotations: | ||
workflows.argoproj.io/display-name: "{{inputs.parameters.display-name}}" | ||
inputs: | ||
parameters: | ||
- name: display-name | ||
container: | ||
image: docker/whalesay | ||
command: [cowsay] | ||
args: ["hello world"] | ||
``` | ||
|
||
In this example, the annotation `workflows.argoproj.io/display-name` is set using the `display-name` parameter. You can override this parameter when submitting the workflow to dynamically change the annotation value. | ||
|
||
## Supported Annotation Types | ||
|
||
Here is a table of all supported annotation types in Argo Workflows: | ||
|
||
| Annotation Key | Description | | ||
|----------------------------------------------|-----------------------------------------------------------------------------| | ||
| `workflows.argoproj.io/display-name` | Changes the node name in the UI. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.