Skip to content

Commit

Permalink
fix: ArtifactGC moved from Template to Artifact. Fixes #8556. (#8581)
Browse files Browse the repository at this point in the history
Signed-off-by: Dillen Padhiar <dpadhiar99@gmail.com>
  • Loading branch information
dpadhiar authored May 3, 2022
1 parent 87470e1 commit ed351ff
Show file tree
Hide file tree
Showing 37 changed files with 2,174 additions and 902 deletions.
12 changes: 8 additions & 4 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4496,6 +4496,10 @@
"description": "ArchiveLogs indicates if the container logs should be archived",
"type": "boolean"
},
"artifactGC": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactGC",
"description": "ArtifactGC describes the strategy to use when to deleting an artifact from completed or deleted workflows"
},
"artifactory": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactoryArtifact",
"description": "Artifactory contains artifactory artifact location details"
Expand Down Expand Up @@ -4633,6 +4637,10 @@
"description": "ArchiveLogs indicates if the container logs should be archived",
"type": "boolean"
},
"artifactGC": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactGC",
"description": "ArtifactGC describes the strategy to use when to deleting an artifact from completed or deleted workflows"
},
"artifactory": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactoryArtifact",
"description": "Artifactory contains artifactory artifact location details"
Expand Down Expand Up @@ -7170,10 +7178,6 @@
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactLocation",
"description": "Location in which all files related to the step will be stored (logs, artifacts, etc...). Can be overridden by individual items in Outputs. If omitted, will use the default artifact repository location configured in the controller, appended with the \u003cworkflowname\u003e/\u003cnodename\u003e in the key."
},
"artifactGC": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactGC",
"description": "ArtifactGC describes the strategy to use when to deleting artifacts from executed templates"
},
"automountServiceAccountToken": {
"description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in pods. ServiceAccountName of ExecutorConfig must be specified if this value is false.",
"type": "boolean"
Expand Down
12 changes: 8 additions & 4 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -8939,6 +8939,10 @@
"description": "ArchiveLogs indicates if the container logs should be archived",
"type": "boolean"
},
"artifactGC": {
"description": "ArtifactGC describes the strategy to use when to deleting an artifact from completed or deleted workflows",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactGC"
},
"artifactory": {
"description": "Artifactory contains artifactory artifact location details",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactoryArtifact"
Expand Down Expand Up @@ -9076,6 +9080,10 @@
"description": "ArchiveLogs indicates if the container logs should be archived",
"type": "boolean"
},
"artifactGC": {
"description": "ArtifactGC describes the strategy to use when to deleting an artifact from completed or deleted workflows",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactGC"
},
"artifactory": {
"description": "Artifactory contains artifactory artifact location details",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactoryArtifact"
Expand Down Expand Up @@ -11592,10 +11600,6 @@
"description": "Location in which all files related to the step will be stored (logs, artifacts, etc...). Can be overridden by individual items in Outputs. If omitted, will use the default artifact repository location configured in the controller, appended with the \u003cworkflowname\u003e/\u003cnodename\u003e in the key.",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactLocation"
},
"artifactGC": {
"description": "ArtifactGC describes the strategy to use when to deleting artifacts from executed templates",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactGC"
},
"automountServiceAccountToken": {
"description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in pods. ServiceAccountName of ExecutorConfig must be specified if this value is false.",
"type": "boolean"
Expand Down
3 changes: 2 additions & 1 deletion docs/executor_swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ It will marshall back to string - marshalling is not symmetric. | |
|------|------|---------|:--------:| ------- |-------------|---------|
| archive | [ArchiveStrategy](#archive-strategy)| `ArchiveStrategy` | | | | |
| archiveLogs | boolean| `bool` | | | ArchiveLogs indicates if the container logs should be archived | |
| artifactGC | [ArtifactGC](#artifact-g-c)| `ArtifactGC` | | | | |
| artifactory | [ArtifactoryArtifact](#artifactory-artifact)| `ArtifactoryArtifact` | | | | |
| from | string| `string` | | | From allows an artifact to reference an artifact from a previous step | |
| fromExpression | string| `string` | | | FromExpression, if defined, is evaluated to specify the value for the artifact | |
Expand Down Expand Up @@ -296,6 +297,7 @@ of a single workflow step, which the executor will use as a default location to
|------|------|---------|:--------:| ------- |-------------|---------|
| archive | [ArchiveStrategy](#archive-strategy)| `ArchiveStrategy` | | | | |
| archiveLogs | boolean| `bool` | | | ArchiveLogs indicates if the container logs should be archived | |
| artifactGC | [ArtifactGC](#artifact-g-c)| `ArtifactGC` | | | | |
| artifactory | [ArtifactoryArtifact](#artifactory-artifact)| `ArtifactoryArtifact` | | | | |
| from | string| `string` | | | From allows an artifact to reference an artifact from a previous step | |
| fromExpression | string| `string` | | | FromExpression, if defined, is evaluated to specify the value for the artifact | |
Expand Down Expand Up @@ -4295,7 +4297,6 @@ Defaults to gzip.DefaultCompression. | |
| activeDeadlineSeconds | [IntOrString](#int-or-string)| `IntOrString` | | | | |
| affinity | [Affinity](#affinity)| `Affinity` | | | | |
| archiveLocation | [ArtifactLocation](#artifact-location)| `ArtifactLocation` | | | | |
| artifactGC | [ArtifactGC](#artifact-g-c)| `ArtifactGC` | | | | |
| automountServiceAccountToken | boolean| `bool` | | | AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in pods.
ServiceAccountName of ExecutorConfig must be specified if this value is false. | |
| container | [Container](#container)| `Container` | | | | |
Expand Down
3 changes: 2 additions & 1 deletion docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,6 @@ Template is a reusable and composable unit of execution in a workflow
|`activeDeadlineSeconds`|[`IntOrString`](#intorstring)|Optional duration in seconds relative to the StartTime that the pod may be active on a node before the system actively tries to terminate the pod; value must be positive integer This field is only applicable to container and script templates.|
|`affinity`|[`Affinity`](#affinity)|Affinity sets the pod's scheduling constraints Overrides the affinity set at the workflow level (if any)|
|`archiveLocation`|[`ArtifactLocation`](#artifactlocation)|Location in which all files related to the step will be stored (logs, artifacts, etc...). Can be overridden by individual items in Outputs. If omitted, will use the default artifact repository location configured in the controller, appended with the <workflowname>/<nodename> in the key.|
|`artifactGC`|[`ArtifactGC`](#artifactgc)|ArtifactGC describes the strategy to use when to deleting artifacts from executed templates|
|`automountServiceAccountToken`|`boolean`|AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in pods. ServiceAccountName of ExecutorConfig must be specified if this value is false.|
|`container`|[`Container`](#container)|Container is the main container image to run in the pod|
|`containerSet`|[`ContainerSetTemplate`](#containersettemplate)|ContainerSet groups multiple containers within a single pod.|
Expand Down Expand Up @@ -1963,6 +1962,7 @@ Artifact indicates an artifact to place at a specified path
|:----------:|:----------:|---------------|
|`archive`|[`ArchiveStrategy`](#archivestrategy)|Archive controls how the artifact will be saved to the artifact repository.|
|`archiveLogs`|`boolean`|ArchiveLogs indicates if the container logs should be archived|
|`artifactGC`|[`ArtifactGC`](#artifactgc)|ArtifactGC describes the strategy to use when to deleting an artifact from completed or deleted workflows|
|`artifactory`|[`ArtifactoryArtifact`](#artifactoryartifact)|Artifactory contains artifactory artifact location details|
|`from`|`string`|From allows an artifact to reference an artifact from a previous step|
|`fromExpression`|`string`|FromExpression, if defined, is evaluated to specify the value for the artifact|
Expand Down Expand Up @@ -4182,6 +4182,7 @@ ArtifactPaths expands a step from a collection of artifacts
|:----------:|:----------:|---------------|
|`archive`|[`ArchiveStrategy`](#archivestrategy)|Archive controls how the artifact will be saved to the artifact repository.|
|`archiveLogs`|`boolean`|ArchiveLogs indicates if the container logs should be archived|
|`artifactGC`|[`ArtifactGC`](#artifactgc)|ArtifactGC describes the strategy to use when to deleting an artifact from completed or deleted workflows|
|`artifactory`|[`ArtifactoryArtifact`](#artifactoryartifact)|Artifactory contains artifactory artifact location details|
|`from`|`string`|From allows an artifact to reference an artifact from a previous step|
|`fromExpression`|`string`|FromExpression, if defined, is evaluated to specify the value for the artifact|
Expand Down
126 changes: 108 additions & 18 deletions manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -869,6 +878,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -2260,15 +2278,6 @@ spec:
type: boolean
type: object
type: object
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
automountServiceAccountToken:
type: boolean
container:
Expand Down Expand Up @@ -3515,6 +3524,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -3944,6 +3962,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -4426,6 +4453,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -5450,6 +5486,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -5967,6 +6012,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -9086,15 +9140,6 @@ spec:
type: boolean
type: object
type: object
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
automountServiceAccountToken:
type: boolean
container:
Expand Down Expand Up @@ -10341,6 +10386,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -10770,6 +10824,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -11252,6 +11315,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -12276,6 +12348,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down Expand Up @@ -12793,6 +12874,15 @@ spec:
type: object
archiveLogs:
type: boolean
artifactGC:
properties:
strategy:
enum:
- ""
- OnWorkflowCompletion
- OnWorkflowDeletion
type: string
type: object
artifactory:
properties:
passwordSecret:
Expand Down
Loading

0 comments on commit ed351ff

Please sign in to comment.