Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions templates/argo-tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [Group](##argo-tasks/group)
- [Copy](##argo-tasks/copy)
- [Create Manifest](##argo-tasks/create-manifest)
- [Delete](##argo-task/delete)
- [Push to Github](##argo-tasks/push-to-github)
- [Generate Path](##argo-tasks/generate-path)
- [STAC setup](##argo-tasks/stac-setup)
Expand Down Expand Up @@ -149,6 +150,34 @@ Create a manifest file for a user specified source and target that includes `.ti
value: '{{workflow.parameters.version_argo_tasks}}'
```

## argo-tasks/delete - `tpl-delete`

Template for deleting files that are `source` in a manifest
See https://github.com/linz/argo-tasks#delete

### Template usage

Delete the `source` entries in a manifest file.

```yaml
- name: delete
templateRef:
name: tpl-delete
template: main
arguments:
parameters:
- name: dry_run
value: 'false'
- name: file
value: '{{item}}'
- name: aws_role_config_path
value: 's3://linz-bucket-config/config-write.topographic.json'
- name: version_argo_tasks
value: '{{workflow.parameters.version_argo_tasks}}'
depends: 'create-manifest'
withParam: '{{tasks.create-manifest.outputs.parameters.files}}'
```

## argo-tasks/push-to-github - `tpl-push-to-github`

Template for Formatting and Pushing STAC Collections to Github
Expand Down
49 changes: 49 additions & 0 deletions templates/argo-tasks/delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/argoproj/argo-workflows/v3.5.5/api/jsonschema/schema.json

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
# Template for deleting files that are `source` in a manifest
# See https://github.com/linz/argo-tasks#delete
name: tpl-delete
spec:
templateDefaults:
container:
imagePullPolicy: Always
image: ''
entrypoint: main
templates:
- name: main
inputs:
parameters:
- name: file
description: Path to the manifest file detailing source to delete

- name: version_argo_tasks
description: version of argo-tasks to use
default: 'v4'

- name: dry_run
description: 'If true, the command will not delete any files.'
default: false'
enum:
- 'true'
- 'false'

- name: aws_role_config_path
description: s3 URL or comma-separated list of s3 URLs allowing the workflow to write to a target(s)
default: ''

container:
image: '019359803926.dkr.ecr.ap-southeast-2.amazonaws.com/argo-tasks:{{=sprig.trim(workflow.parameters.version_argo_tasks)}}'
resources:
requests:
memory: 7.8Gi # TODO: to review
cpu: 2000m # TODO: to review
env:
- name: AWS_ROLE_CONFIG_PATH
value: '{{inputs.parameters.aws_role_config_path}}'
args:
- 'delete'
- '--dry-run={{inputs.parameters.dry_run}}'
- '{{inputs.parameters.file}}'