Skip to content

docsy(v2): document ephemeral/disk storage in task resources#1198

Open
ppiegaze wants to merge 1 commit into
mainfrom
docsy/v2-ephemeral-storage
Open

docsy(v2): document ephemeral/disk storage in task resources#1198
ppiegaze wants to merge 1 commit into
mainfrom
docsy/v2-ephemeral-storage

Conversation

@ppiegaze

@ppiegaze ppiegaze commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

What

Adds an Ephemeral storage section to the task-configuration Resources page (content/user-guide/task-configuration/resources.md) explaining the disk parameter of flyte.Resources:

  • what ephemeral storage is (node-local scratch disk for the task container) and what it covers vs. offloaded File/Dir storage;
  • that disk maps to the Kubernetes ephemeral-storage resource;
  • its pod-tied lifecycle (provisioned at task start, reclaimed on pod termination — nothing persists);
  • that disk is a single value, not a (request, limit) tuple (unlike cpu/memory);
  • default (unset) behavior and eviction risk under node storage pressure;
  • a union-gated cross-link to the existing "Be explicit about ephemeral storage" resource-management guidance.

Why

Resolves DOC-101 ("How does ephemeral storage work?"). The disk field was shipped but only listed as a one-line parameter ("Ephemeral storage — 10Gi") with no explanation of the mechanism. Genuine partial-coverage gap.

Verify-live evidence (code is authoritative)

  • SDK signature (flyte._resources.Resources): disk: Optional[str] = None; docstring — "The amount of disk to allocate to the task. This is a string of the form 10GiB." Single value, no tuple.
  • k8s mapping (flyte/_internal/runtime/resources_serde.py): _get_disk_resource_entrytasks_pb2.Resources.ResourceName.EPHEMERAL_STORAGE; and pod_spec_from_resources maps ephemeral_storageephemeral-storage.
  • Live docs (.../task-configuration/resources/): confirmed disk only listed, unexplained.

Draft — held per docsy publish-gate (feature already shipped in the 2.0.x SDK; ready for review).

Add an "Ephemeral storage" section to the task-configuration Resources
page explaining the `disk` parameter: what ephemeral storage is, how it
maps to the Kubernetes ephemeral-storage resource, its pod-tied
lifecycle, that it is a single value (not a request/limit tuple), and
its default (unset) behavior. Cross-links the union-only resource-
management guidance. Closes the DOC-101 gap (disk was only listed as a
one-line parameter with no explanation of the mechanism).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

GHA build & deploy preview

Built by .github/workflows/build-pr.yml and deployed to the docs CF Pages project by .github/workflows/deploy-pr-preview.yml.

Branch alias https://pr-1198-docsy-v2-ephemeral-s.docs-dog.pages.dev
This commit https://100f45e9.docs-dog.pages.dev
Commit SHA 397dc58c374963a9d96eb24af17a8713e352a1cc

Updated automatically on every push.

@ppiegaze ppiegaze marked this pull request as ready for review July 13, 2026 14:31
Copilot AI review requested due to automatic review settings July 13, 2026 14:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing conceptual documentation for Flyte SDK’s Resources(disk=...) so users understand what ephemeral storage is, what it applies to, and its lifecycle/risks in Kubernetes-backed execution.

Changes:

  • Adds a new “Ephemeral storage” section describing the disk parameter and its Kubernetes ephemeral-storage mapping.
  • Clarifies what ephemeral storage covers vs. offloaded flyte.io.File / flyte.io.Dir.
  • Adds a Union-only cross-link to existing ephemeral storage guidance in resource management.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


**Single value, not a request/limit range.** Unlike `cpu` and `memory`, `disk` takes a single string, not a `(request, limit)` tuple.

**Default behavior.** If you don't set `disk`, no ephemeral-storage request or limit is applied. The pod can still write to node-local disk, but it may be evicted if the node comes under storage pressure. Tasks doing heavy local data processing should set `disk` explicitly.
)
```

Under the hood, `disk` maps to the Kubernetes [`ephemeral-storage`](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage) resource on the task's pod.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants