Storage and staging
Only inputs and outputs touch your storage. tif copies each input onto the task's volume before the executors run; tof uploads each output after they finish.
- Inputs:
s3://,http://,https://,ftp://,ftps://and inlinecontent. - Outputs:
s3://,http://,https://,ftp://andftps://. ftp://andftps://are on unless the operator turns them off (see FTP).drs://(GA4GH DRS) for inputs, only where the operator turns it on (see DRS).gs://(Google Cloud Storage) andaz://(Azure Blob Storage) for both, only where the operator turns them on (see Object stores).file://for both, only where the operator turns it on (see Local paths).- Inline content as an output, or an unknown scheme, is refused with
400.GET /service-infolists the schemes this deployment accepts. - Also refused with
400at submit, since they would only fail in the Pod: an input with neitherurlnorcontent, aDIRECTORYinput overhttp(s)://,drs://or as inlinecontent, ans3://,gs://oraz://URL whose provider the operator hasn't turned on, an FTP URL where FTP is off, and adrs://URI that DRS is off for, whose host isn't allowed, or that is a compact identifier.
Common patterns
- No IO: executors only. Useful to smoke-test image pulls and scheduling.
- Object store in, object store out:
inputs[]andoutputs[]point ats3://,gs://oraz://URLs. - Inline content:
inputs[].contentcarries the file body; no external storage needed. An input with non-emptycontentignores itsurl, as TES requires. - Multi-executor: executors run in order; data persists between them only under the task's paths.
Object stores
tif and tof reach S3, Google Cloud Storage and Azure Blob Storage through one code path, built on obstore. A URL names a bucket (for Azure, a container) and a key:
| Scheme | URL | Tested end to end (kind, in CI) |
|---|---|---|
s3:// | s3://bucket/key | SeaweedFS: FILE and DIRECTORY in and out, a 20 MiB upload in parts. |
gs:// | gs://bucket/key | fake-gcs-server: FILE and DIRECTORY in and out. Uploads in parts are not covered: the emulator lacks them. |
az:// | az://container/blob | Azurite: FILE and DIRECTORY in and out, a 20 MiB upload in parts. |
These are emulators. CI does not run against AWS, Google Cloud or Azure, and workload identity is tested with unit tests only (against a mocked token service for Google). The per-cloud guides (AWS, Google Cloud, Azure) list the setup.
A provider is off until the operator turns it on. While it is off, its scheme is refused at submit with 400 and isn't listed in GET /service-info. Each provider has one default store (the s3, gcs and azure blocks below); several stores can serve different buckets with different endpoints and credentials.
How tif and tof handle keys:
- The key is used as written.
?,#,[,{and*are part of the key; aFILEinput fetches exactly that object. - A
DIRECTORYinput downloads every object below the key, in whole path segments:s3://b/intakesin/a.txt, notin2/a.txt. ADIRECTORYinput that matches no object fails the task. - Folder markers are skipped: keys ending in
/, and a key that is also the directory of other keys. - A key that would land outside the input's directory, such as
in/../x, fails the task. Nothing is written outside the input's path. - A
DIRECTORYor glob output uploads each file below the URL's key plus the file's relative path. If the output URL itself has wildcards (s3://b/out/*.vcf), files go below the part before them (out/). - Up to 4 files of a
DIRECTORYor glob move at once. Downloads stream to disk. Large uploads go in parts, 4 at a time. - A
5xxresponse, a dropped connection or a timeout is retried up to 10 times with exponential backoff, for at most 3 minutes per request.
S3
Point Poiesis at AWS S3 or an S3-compatible store (Ceph, SeaweedFS, MinIO):
s3:
endpoint: "" # AWS_ENDPOINT_URL; empty for AWS
region: eu-central-1 # AWS_REGION
existingSecret: poiesis-s3S3 is on when any of existingSecret, roleArn, anonymous: true or enabled: true is set. Other settings:
| Value | Default | Meaning |
|---|---|---|
s3.virtualHostedStyle | false | true sends https://<bucket>.<endpoint>/<key>. false sends path-style https://<endpoint>/<bucket>/<key>, which SeaweedFS and MinIO need. |
s3.serverSideEncryption | "" | AES256 (SSE-S3), aws:kms (SSE-KMS) or aws:kms:dsse, for every upload. |
s3.kmsKeyId | "" | KMS key for aws:kms; empty uses the bucket's default key. |
s3.requesterPays | false | Pay for requests to requester-pays buckets. |
s3.anonymous | false | Unsigned requests, for public buckets. No keys or role. |
An http:// endpoint is allowed; use https:// outside a trusted network.
Static keys. The Secret holds AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, and optionally AWS_SESSION_TOKEN for temporary credentials. The chart never creates it:
kubectl -n poiesis create secret generic poiesis-s3 \
--from-literal=AWS_ACCESS_KEY_ID=… \
--from-literal=AWS_SECRET_ACCESS_KEY=…trec, tif and tof read these keys from the Secret by reference (secretKeyRef), so the values are not in the Job or Pod spec. Executors do not get them. The endpoint and region are not secret and are set as plain values.
A Pod can only read Secrets in its own namespace. If taskpods.namespace is not the release namespace, create the Secret there as well; the chart does not copy it. Use taskpods.s3Secret if it has a different name in the task namespace:
taskpods:
namespace: poiesis-tasks
s3Secret: poiesis-s3 # default: s3.existingSecretIf the Secret is missing in the task namespace, no TaskPod can start, not only the ones that use s3://.
Workload identity on EKS (IRSA). Set the role and leave existingSecret empty:
s3:
region: eu-central-1
roleArn: arn:aws:iam::123456789012:role/poiesis-filerThe API then adds a ServiceAccount token for the audience sts.amazonaws.com to each TaskPod and mounts it into tif and tof only, with AWS_ROLE_ARN and AWS_WEB_IDENTITY_TOKEN_FILE pointing at it. They trade it for the role's credentials at AWS STS.
- Create an IAM OIDC provider for the cluster, as for any IRSA setup.
- Give the role a trust policy for that provider with the subject
system:serviceaccount:<taskpod namespace>:<taskpod ServiceAccount>(by default<release>-poiesis-taskpod) and the audiencests.amazonaws.com. - Grant the role
s3:GetObject,s3:PutObjectands3:ListBucketon the buckets tasks use, andkms:Decrypt/kms:GenerateDataKeyif they are encrypted with SSE-KMS.
Don't annotate the TaskPod ServiceAccount with eks.amazonaws.com/role-arn. The EKS webhook would then inject the token into every container of the TaskPod, executors included, and any user image could act as the role.
Instance credentials. With s3.enabled: true and neither keys nor a role, tif and tof use the default chain: the EC2 instance role through IMDS, or EKS Pod Identity if its agent injects credentials. Executors on the same node can usually reach IMDS too, so prefer roleArn.
Google Cloud Storage
GCS needs a key, Workload Identity Federation or anonymous: true (unsigned requests, public buckets only). With none, tif and tof would ask the node's metadata server, which executors can reach too, so the chart refuses it.
Service account key.
gcs:
enabled: true
existingSecret: poiesis-gcs # in the TaskPod namespaceThe Secret holds a service account's JSON key under GOOGLE_SERVICE_ACCOUNT_KEY. It reaches tif and tof only, by reference:
kubectl -n <taskpod namespace> create secret generic poiesis-gcs \
--from-file=GOOGLE_SERVICE_ACCOUNT_KEY=key.jsonWorkload Identity Federation. Name a workload identity pool provider that trusts the cluster's OIDC issuer, and leave existingSecret empty:
gcs:
enabled: true
workloadIdentityProvider: //iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/poiesis/providers/cluster
serviceAccount: poiesis-filer@my-project.iam.gserviceaccount.com # optionalThe API adds a ServiceAccount token for the audience https:<workloadIdentityProvider> to each TaskPod and mounts it into tif and tof only. They send it to Google STS (sts.googleapis.com) for a federated token and, when serviceAccount is set, trade that for the service account's token (iamcredentials.googleapis.com, scope devstorage.read_write). Tokens are renewed 5 minutes before they expire. Without serviceAccount, grant the bucket roles to the federated principal itself.
This does not use GKE's built-in Workload Identity (the iam.gke.io/gcp-service-account annotation): that serves tokens from the node's metadata server to every container of the Pod, executors included. Don't annotate the TaskPod ServiceAccount with it. See Google Cloud for the pool and provider setup.
Endpoint. gcs.endpoint replaces https://storage.googleapis.com, for Private Service Connect or an emulator. An http:// endpoint is allowed. STS and IAM Credentials are always the public Google endpoints.
GCS also works through its S3-compatible API with HMAC keys as s3: settings.
Azure Blob Storage
azure:
enabled: true
accountName: poiesisdata
existingSecret: poiesis-azure # or the workload identity belowaz://container/blob names a blob in that account. The Secret, in the TaskPod namespace, holds AZURE_STORAGE_ACCOUNT_KEY or AZURE_STORAGE_SAS_TOKEN. Both keys are optional in the Secret; put in the one you have. A SAS token can be pasted with or without its leading ?; it needs read, write and list permissions on the containers tasks use, and tasks fail once it expires.
kubectl -n <taskpod namespace> create secret generic poiesis-azure \
--from-literal=AZURE_STORAGE_SAS_TOKEN='sv=…&sig=…'azure.anonymous: true sends unsigned requests, for containers with public read access; leave existingSecret and clientId empty.
azure.endpoint replaces https://<accountName>.blob.core.windows.net, for a private endpoint with a custom DNS name, a sovereign cloud (for example https://<account>.blob.core.chinacloudapi.cn), Azure Stack Hub or Azurite (http://azurite:10000/<account>). An http:// endpoint is allowed.
Workload identity on AKS. Set the managed identity's client ID and its tenant, and leave existingSecret empty:
azure:
enabled: true
accountName: poiesisdata
clientId: 00000000-0000-0000-0000-000000000000
tenantId: 00000000-0000-0000-0000-000000000000The API adds a ServiceAccount token for the audience api://AzureADTokenExchange to each TaskPod and mounts it into tif and tof only, with AZURE_CLIENT_ID, AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE.
- Enable the cluster's OIDC issuer.
- Add a federated credential to the managed identity with that issuer, the subject
system:serviceaccount:<taskpod namespace>:<taskpod ServiceAccount>and the audienceapi://AzureADTokenExchange. - Give the identity
Storage Blob Data Contributoron the account or its containers.
Don't add the azure.workload.identity/use label or the azure.workload.identity/client-id annotation: the AKS webhook would inject the token into every container, executors included.
Several stores
objectStores adds named stores next to the default ones. Each has a provider, the buckets it serves (containers, for Azure), and the same options as that provider's default block, without enabled. For example, public data on AWS, a lab's Ceph with its own keys, and everything else on the default S3 store:
s3:
region: eu-central-1
existingSecret: poiesis-s3 # the default store
objectStores:
- name: aws-open-data
provider: s3
buckets: ["1000genomes", "gnomad-public-*"]
region: us-east-1
anonymous: true
- name: ceph
provider: s3
buckets: ["lab-*"]
endpoint: https://ceph.example.org
existingSecret: poiesis-ceph| URL | Store | Credentials |
|---|---|---|
s3://1000genomes/… | aws-open-data | none (unsigned requests) |
s3://gnomad-public-v4/… | aws-open-data | none (unsigned requests) |
s3://lab-results/… | ceph | Secret poiesis-ceph |
s3://anything-else/… | default s3 | Secret poiesis-s3 |
How a URL finds its store:
- A pattern is a bucket name, or a prefix ending in
*(*alone takes every bucket). Matching is case sensitive. - The named store of the URL's provider whose patterns match the bucket serves it. Otherwise the provider's default store does, if it is on. Otherwise the task is refused at submit with
400naming the bucket. - Patterns of two stores of one provider may not overlap (
lab-*andlab-archive, say). The API refuses to start and names both stores. The same bucket name under two providers is fine. - The URL stays
s3://bucket/key: TES requests don't name a store, andGET /service-infolists schemes only, not store names. drs://inputs that resolve to an object-store URL go through the same lookup. An access method whose bucket no store serves is skipped.
Credentials stay as for the default stores, per store:
existingSecretis a Secret in the TaskPod namespace with the provider's usual keys (AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY,GOOGLE_SERVICE_ACCOUNT_KEY, orAZURE_STORAGE_ACCOUNT_KEY/AZURE_STORAGE_SAS_TOKEN).tifandtofread them by reference, asPOIESIS_STORE_<NAME>_<KEY>;trecand executors get nothing.roleArn(S3),clientIdandtenantId(Azure) andworkloadIdentityProvider(GCS) use workload identity, as above. One ServiceAccount token is mounted per audience: every AWS role shares one, every Azure identity shares one, each Google pool provider gets its own.anonymous: truesends unsigned requests and takes no credentials. A store sets one credential source at most. A named S3 store with none uses the node's instance credentials, ass3.enabled: truedoes.- A named store never sees the default store's settings: its endpoint, region and keys are only its own.
The store table (no secret values) reaches tif and tof as one JSON value, POIESIS_OBJECT_STORES.
All three stores share one code path. The end-to-end tests run it against emulators, not the real cloud services. SFTP is not supported. FUSE mounts are planned (#27).
FTP
ftp:// and ftps:// URLs work for inputs (FILE and DIRECTORY) and outputs (FILE, DIRECTORY and glob), for public archives such as EBI, ENA and NCBI:
{ "url": "ftp://ftp.ebi.ac.uk/pub/databases/…/genome.fa.gz", "path": "/data/genome.fa.gz" }- Passive mode, binary transfers.
ftps://is explicit TLS (AUTH TLS), with the server's certificate checked; implicit TLS (port 990) is not supported. - A URL with no user logs in as
anonymous.ftp://user:password@host/…logs in with those. - The path is relative to the login directory, as in RFC 1738; on public archives that is the server's root. Start it with
%2Ffor an absolute path. - A
DIRECTORYinput downloads everything under the directory. Names in the server's listing are reduced to their last path segment, and.and..are skipped, so nothing lands outside the input's path. - A
FILEinput is written to a temporary file next to its path and renamed into place once complete. - An upload creates the directories it needs.
- A dropped or refused connection, a timeout or a
4xxreply is retried twice, after 1 s and 2 s. A5xxreply fails at once:550for a file that is missing or not readable,530for a rejected login. The task'ssystem_logsshow the reply.
Credentials in an FTP URL are stored with the task, like the rest of the URL, and anyone who can read the task can read them. Logs, termination messages and logs[].outputs leave them out. Plain ftp:// sends them unencrypted; use ftps:// where the server has it.
The operator turns FTP off with taskpods.ftp.enabled: false; tasks using it then get a 400, and GET /service-info doesn't list it.
DRS
drs:// inputs name an object on a GA4GH DRS 1.x server, as a hostname-based URI: drs://<host>/<object_id>. DRS is off by default:
taskpods:
drs:
enabled: true
allowedHosts: ["drs.example.org"] # empty: any host
existingSecret: poiesis-drs # optional, key DRS_BEARER_TOKENtif resolves the URI, then stages the URL it gets like any other input:
GET https://<host>/ga4gh/drs/v1/objects/<object_id>.- It picks the first access method whose URL this deployment can stage:
https, thens3,gsorazwhere a store of this deployment serves the bucket (several stores), thenftps,ftpandhttp. - For an
access_id, it gets the URL from/objects/<object_id>/access/<access_id>. Headers in that answer go with the data request (not to another host after a redirect). An object-store or FTP URL that needs headers is skipped.
- The bearer token from
existingSecretgoes to the DRS server only, never to the data URL. It reachestifby reference;tof,trecand executors don't get it. - Refused with
400at submit:drs://while DRS is off, a host not inallowedHosts, a compact-identifier URI (drs://namespace:accession) and aDIRECTORYinput. - Fails the task in
tif: a bundle (an object withcontents), an unknown object (404), access denied (401,403), or no access method this deployment can stage. drs://can't be an output: DRS has no upload API.
Glob outputs
An output whose path has wildcards, such as /outputs/*.vcf, uploads every file and directory that matches, each under its path relative to path_prefix (inferred from the path when unset). Patterns follow Python's glob: *, ? and [...]; ** matches one level only, and {a,b} is not expanded.
If the glob matches no file, tof uploads nothing for that output and logs a warning naming it; the task still succeeds.
taskpods.outputGlobFallback: true makes tof upload every file under path_prefix instead, for clients whose patterns don't match the files they mean. That can export far more than the client asked for. It is off by default.
An output that is a symlink pointing outside the task volume, or a directory holding one, fails the task: tof would otherwise follow the link into its own container. Links that stay inside the volume are fine.
Local paths
file:// URLs are off by default; a task that uses one gets a 400. A file:// path is read or written inside tif and tof, not on the client's machine, so it is only useful for data the operator mounts into TaskPods, such as a shared reference volume.
taskpods:
extraVolumes:
- name: reference
persistentVolumeClaim: { claimName: reference-data }
extraVolumeMounts:
- name: reference
mountPath: /mnt/reference
readOnly: true
fileUrlRoots: ["/mnt/reference"]- A URL must name a path under one of
fileUrlRoots; anything else is refused with400. tifandtofresolve symlinks before they read or write, and stop if the real path leaves those directories.GET /service-infolistsfile://only when it is on.
HTTP(S) inputs
tif downloads an http:// or https:// input with a GET request. It stages the input only from a 2xx response. The body goes to a temporary file next to the input's path and is renamed into place once it is complete, so a failed download leaves no file at the input's path.
| Response | What tif does |
|---|---|
2xx | Stages the body as the input. |
301, 302, 303, 307, 308 | Follows up to 10 redirects, unless the request has reached an https:// URL and the new one isn't. |
429, 500, 502, 503, 504, connection error, timeout, body cut short | Retries twice, after 1 s and 2 s, each time from the input URL. |
| Anything else | Fails the task; nothing is staged. An expired presigned URL answers 403. |
A failed download ends the task in SYSTEM_ERROR (see Staging failures). Directories can't be downloaded over HTTP(S).
HTTP(S) outputs
An outputs[].url can be an http:// or https:// URL that grants access by itself, such as a presigned upload URL from Amazon S3 or Google Cloud Storage, so tof needs no credentials for the client's storage. tof streams each file from disk in a PUT request with a Content-Length header, as presigned upload URLs require.
- A presigned URL is signed for one object, so use one
FILEoutput per presigned URL. - For a
DIRECTORYor glob output,tofderives each file's URL by appending the file's relative path, escaped, to the path of the output URL, keeping its query string. Those URLs carry no valid signature, so point the output URL at a server that signs each upload as it arrives and redirects it to the storage provider. - If a glob matches no file,
tofuploads nothing (see Glob outputs). WithoutputGlobFallbackon, it uploads every file underpath_prefixinstead, and behind a signing server all of those files are signed and stored.
Responses:
| Response | What tof does |
|---|---|
2xx | Done. |
307, 308 | Sends the file again to the new URL, unless the request has reached an https:// URL and the new one isn't. The first request carries the file too, so up to the whole file reaches a redirecting server. |
301, 302, 303 | Fails: following would turn the PUT into a GET. |
429, 500, 502, 503, 504, connection error, timeout | Retries twice, after 1 s and 2 s, each time from the output URL. |
| Anything else | Fails; the task's system_logs and the tof log show the start of the response body. |
tofsets no size limit, but providers cap a singlePUT: 5 GB on Amazon S3.tofconnects to whatever host the output URL or a redirect names, from the TaskPod's network, as executors can. To limit where tasks send data, restrict egress from the task namespace with a NetworkPolicy.- Over
http://, the URL (including any signature) and the file travel unencrypted; usehttps://outside a trusted network. - The URL is stored with the task, including any signature in its query string, so issue presigned URLs with a short expiry.
Output file logs
Once every output is uploaded, tof stores one entry per uploaded file in the task's logs[].outputs, shown in the BASIC and FULL views:
| Field | Value |
|---|---|
path | The file's path in the executor, e.g. /outputs/dir/a.txt. |
size_bytes | The file's size, as a string. |
url | Where the file was uploaded, without the URL's query string or fragment. |
- A
DIRECTORYor glob output gives one entry per file under it, each with the URL that file went to. - The query of a presigned URL is its signature, so it is not stored in the entry. The output's own
urlinoutputs[]keeps it, as submitted. - A
tofthat runs again replaces the entries; it doesn't add more. - If
tofcan't store the entries, it fails and the task ends inSYSTEM_ERROR, though its files are uploaded: aCOMPLETEtask always has its file list.
Staging failures
When tif or tof fails, the task's system_logs say why. The filer writes one line to its container's termination message, and TCtl copies it into the log:
container tif exited with code 1: input /inputs/reads.fq: HTTPError: GET https://bucket.example/reads.fq returned 403: <Error><Code>AccessDenied</Code>...The line is at most 1 KiB. Query strings and the credentials of a URL are cut from it, since the query of a presigned URL is its signature.
| What failed | Task state |
|---|---|
Storage unreachable, a 5xx, a timeout | SYSTEM_ERROR |
| Access denied, an expired or rejected URL, a missing input | SYSTEM_ERROR |
| A full task volume, or the task can't be read from or its output file logs written to the database | SYSTEM_ERROR |
| A declared output the executors didn't produce | EXECUTOR_ERROR |
The rule: a failed filer is SYSTEM_ERROR, because no executor failed. The one exception is an output whose path isn't on the task's volume when tof runs, or is a file where a DIRECTORY was declared. The executors didn't produce what the task declared, so the task ends in EXECUTOR_ERROR and the log names the output:
container tof exited with code 1: output /outputs/sorted.bam was not produced by the executorsA glob that matches no file is not a failure (see Glob outputs).
