Skip to content

Commit

Permalink
feat: Enable configuration for finalizer removal if artifact GC fails (
Browse files Browse the repository at this point in the history
…#10810)

Signed-off-by: Julie Vogelmani <julie_vogelman@intuit.com>
  • Loading branch information
juliev0 committed Apr 7, 2023
1 parent 49890ec commit e734ae5
Show file tree
Hide file tree
Showing 30 changed files with 1,504 additions and 770 deletions.
26 changes: 24 additions & 2 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3577,7 +3577,7 @@
"type": "object"
},
"io.argoproj.workflow.v1alpha1.ArtifactGC": {
"description": "ArtifactGC describes how to delete artifacts from completed Workflows",
"description": "ArtifactGC describes how to delete artifacts from completed Workflows - this is embedded into the WorkflowLevelArtifactGC, and also used for individual Artifacts to override that as needed",
"properties": {
"podMetadata": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Metadata",
Expand Down Expand Up @@ -7091,6 +7091,28 @@
],
"type": "object"
},
"io.argoproj.workflow.v1alpha1.WorkflowLevelArtifactGC": {
"description": "WorkflowLevelArtifactGC describes how to delete artifacts from completed Workflows - this spec is used on the Workflow level",
"properties": {
"forceFinalizerRemoval": {
"description": "ForceFinalizerRemoval: if set to true, the finalizer will be removed in the case that Artifact GC fails",
"type": "boolean"
},
"podMetadata": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Metadata",
"description": "PodMetadata is an optional field for specifying the Labels and Annotations that should be assigned to the Pod doing the deletion"
},
"serviceAccountName": {
"description": "ServiceAccountName is an optional field for specifying the Service Account that should be assigned to the Pod doing the deletion",
"type": "string"
},
"strategy": {
"description": "Strategy is the strategy to use.",
"type": "string"
}
},
"type": "object"
},
"io.argoproj.workflow.v1alpha1.WorkflowLintRequest": {
"properties": {
"namespace": {
Expand Down Expand Up @@ -7252,7 +7274,7 @@
"description": "Arguments contain the parameters and artifacts sent to the workflow entrypoint Parameters are referencable globally using the 'workflow' variable prefix. e.g. {{io.argoproj.workflow.v1alpha1.parameters.myparam}}"
},
"artifactGC": {
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactGC",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowLevelArtifactGC",
"description": "ArtifactGC describes the strategy to use when deleting artifacts from completed or deleted workflows (applies to all output Artifacts unless Artifact.ArtifactGC is specified, which overrides this)"
},
"artifactRepositoryRef": {
Expand Down
26 changes: 24 additions & 2 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7525,7 +7525,7 @@
}
},
"io.argoproj.workflow.v1alpha1.ArtifactGC": {
"description": "ArtifactGC describes how to delete artifacts from completed Workflows",
"description": "ArtifactGC describes how to delete artifacts from completed Workflows - this is embedded into the WorkflowLevelArtifactGC, and also used for individual Artifacts to override that as needed",
"type": "object",
"properties": {
"podMetadata": {
Expand Down Expand Up @@ -11003,6 +11003,28 @@
}
}
},
"io.argoproj.workflow.v1alpha1.WorkflowLevelArtifactGC": {
"description": "WorkflowLevelArtifactGC describes how to delete artifacts from completed Workflows - this spec is used on the Workflow level",
"type": "object",
"properties": {
"forceFinalizerRemoval": {
"description": "ForceFinalizerRemoval: if set to true, the finalizer will be removed in the case that Artifact GC fails",
"type": "boolean"
},
"podMetadata": {
"description": "PodMetadata is an optional field for specifying the Labels and Annotations that should be assigned to the Pod doing the deletion",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Metadata"
},
"serviceAccountName": {
"description": "ServiceAccountName is an optional field for specifying the Service Account that should be assigned to the Pod doing the deletion",
"type": "string"
},
"strategy": {
"description": "Strategy is the strategy to use.",
"type": "string"
}
}
},
"io.argoproj.workflow.v1alpha1.WorkflowLintRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -11166,7 +11188,7 @@
},
"artifactGC": {
"description": "ArtifactGC describes the strategy to use when deleting artifacts from completed or deleted workflows (applies to all output Artifacts unless Artifact.ArtifactGC is specified, which overrides this)",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactGC"
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowLevelArtifactGC"
},
"artifactRepositoryRef": {
"description": "ArtifactRepositoryRef specifies the configMap name and key containing the artifact repository config.",
Expand Down
2 changes: 1 addition & 1 deletion docs/executor_swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ set when loading input artifacts. | |
### <span id="artifact-g-c"></span> ArtifactGC


> ArtifactGC describes how to delete artifacts from completed Workflows
> ArtifactGC describes how to delete artifacts from completed Workflows - this is embedded into the WorkflowLevelArtifactGC, and also used for individual Artifacts to override that as needed


Expand Down
25 changes: 22 additions & 3 deletions docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ WorkflowSpec is the specification of a Workflow.
|`affinity`|[`Affinity`](#affinity)|Affinity sets the scheduling constraints for all pods in the io.argoproj.workflow.v1alpha1. Can be overridden by an affinity specified in the template|
|`archiveLogs`|`boolean`|ArchiveLogs indicates if the container logs should be archived|
|`arguments`|[`Arguments`](#arguments)|Arguments contain the parameters and artifacts sent to the workflow entrypoint Parameters are referencable globally using the 'workflow' variable prefix. e.g. {{io.argoproj.workflow.v1alpha1.parameters.myparam}}|
|`artifactGC`|[`ArtifactGC`](#artifactgc)|ArtifactGC describes the strategy to use when deleting artifacts from completed or deleted workflows (applies to all output Artifacts unless Artifact.ArtifactGC is specified, which overrides this)|
|`artifactGC`|[`WorkflowLevelArtifactGC`](#workflowlevelartifactgc)|ArtifactGC describes the strategy to use when deleting artifacts from completed or deleted workflows (applies to all output Artifacts unless Artifact.ArtifactGC is specified, which overrides this)|
|`artifactRepositoryRef`|[`ArtifactRepositoryRef`](#artifactrepositoryref)|ArtifactRepositoryRef specifies the configMap name and key containing the artifact repository config.|
|`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.|
|`dnsConfig`|[`PodDNSConfig`](#poddnsconfig)|PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.|
Expand Down Expand Up @@ -1432,9 +1432,9 @@ Arguments to a template
|`artifacts`|`Array<`[`Artifact`](#artifact)`>`|Artifacts is the list of artifacts to pass to the template or workflow|
|`parameters`|`Array<`[`Parameter`](#parameter)`>`|Parameters is the list of parameters to pass to the template or workflow|

## ArtifactGC
## WorkflowLevelArtifactGC

ArtifactGC describes how to delete artifacts from completed Workflows
WorkflowLevelArtifactGC describes how to delete artifacts from completed Workflows - this spec is used on the Workflow level

<details>
<summary>Examples with this field (click to open)</summary>
Expand All @@ -1446,6 +1446,7 @@ ArtifactGC describes how to delete artifacts from completed Workflows
### Fields
| Field Name | Field Type | Description |
|:----------:|:----------:|---------------|
|`forceFinalizerRemoval`|`boolean`|ForceFinalizerRemoval: if set to true, the finalizer will be removed in the case that Artifact GC fails|
|`podMetadata`|[`Metadata`](#metadata)|PodMetadata is an optional field for specifying the Labels and Annotations that should be assigned to the Pod doing the deletion|
|`serviceAccountName`|`string`|ServiceAccountName is an optional field for specifying the Service Account that should be assigned to the Pod doing the deletion|
|`strategy`|`string`|Strategy is the strategy to use.|
Expand Down Expand Up @@ -3247,6 +3248,24 @@ ArchiveStrategy describes how to archive files/directory when saving artifacts
|`tar`|[`TarStrategy`](#tarstrategy)|_No description available_|
|`zip`|[`ZipStrategy`](#zipstrategy)|_No description available_|

## ArtifactGC

ArtifactGC describes how to delete artifacts from completed Workflows - this is embedded into the WorkflowLevelArtifactGC, and also used for individual Artifacts to override that as needed

<details>
<summary>Examples with this field (click to open)</summary>
<br>

- [`artifact-gc-workflow.yaml`](https://github.com/argoproj/argo-workflows/blob/master/examples/artifact-gc-workflow.yaml)
</details>

### Fields
| Field Name | Field Type | Description |
|:----------:|:----------:|---------------|
|`podMetadata`|[`Metadata`](#metadata)|PodMetadata is an optional field for specifying the Labels and Annotations that should be assigned to the Pod doing the deletion|
|`serviceAccountName`|`string`|ServiceAccountName is an optional field for specifying the Service Account that should be assigned to the Pod doing the deletion|
|`strategy`|`string`|Strategy is the strategy to use.|

## ArtifactoryArtifact

ArtifactoryArtifact is the location of an artifactory artifact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,8 @@ spec:
type: object
artifactGC:
properties:
forceFinalizerRemoval:
type: boolean
podMetadata:
properties:
annotations:
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/full/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,8 @@ spec:
type: object
artifactGC:
properties:
forceFinalizerRemoval:
type: boolean
podMetadata:
properties:
annotations:
Expand Down
4 changes: 4 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ spec:
type: object
artifactGC:
properties:
forceFinalizerRemoval:
type: boolean
podMetadata:
properties:
annotations:
Expand Down Expand Up @@ -30631,6 +30633,8 @@ spec:
type: object
artifactGC:
properties:
forceFinalizerRemoval:
type: boolean
podMetadata:
properties:
annotations:
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,8 @@ spec:
type: object
artifactGC:
properties:
forceFinalizerRemoval:
type: boolean
podMetadata:
properties:
annotations:
Expand Down
Loading

0 comments on commit e734ae5

Please sign in to comment.