Skip to content

Create a Volume

POST
/apis/nodus.dev/v1/namespaces/{namespace}/volumes
curl --request POST \
--url https://example.com/apis/nodus.dev/v1/namespaces/example/volumes \
--header 'Content-Type: application/json' \
--data '{ "apiVersion": "example", "kind": "example", "metadata": { "annotations": { "additionalProperty": "example" }, "creationTimestamp": "example", "deletionGracePeriodSeconds": 1, "deletionTimestamp": "example", "finalizers": [ "example" ], "generateName": "example", "generation": 1, "labels": { "additionalProperty": "example" }, "managedFields": [ { "apiVersion": "example", "fieldsType": "example", "fieldsV1": { "additionalProperty": "example" }, "manager": "example", "operation": "example", "subresource": "example", "time": "example" } ], "name": "example", "namespace": "example", "ownerReferences": [ { "apiVersion": "example", "blockOwnerDeletion": true, "controller": true, "kind": "example", "name": "example", "uid": "example" } ], "resourceVersion": "example", "selfLink": "example", "uid": "example" }, "spec": { "accessMode": "example", "commitInterval": "example", "maxCostUSD": "example", "revisionHistoryLimit": 1, "size": "example", "source": { "connectionQuery": { "connection": "example", "format": "example", "sql": "example" }, "git": { "lfs": true, "ref": "example", "repo": "example" }, "huggingface": { "files": [ "example" ], "repo": "example", "revision": "example", "secret": "example" }, "s3": { "connection": "example", "uri": "example" }, "upload": {}, "url": { "extract": "example", "sha256": "example", "url": "example" } }, "ttlAfterUnused": "example" }, "status": { "conditions": [ { "lastTransitionTime": "example", "message": "example", "observedGeneration": 1, "reason": "example", "status": "example", "type": "example" } ], "holder": { "attempt": "example", "epoch": 1, "kind": "example", "name": "example" }, "import": { "attempt": "example", "bytes": 1, "completionTime": "example", "files": 1, "generation": 1, "sha256": "example", "startTime": "example" }, "lastCommitTime": "example", "message": "example", "observedGeneration": 1, "phase": "example", "readers": 1, "reason": "example", "revision": 1, "storage": { "billedBytes": 1, "bytes": 1 }, "used": "example" } }'
namespace
required
string

The project.

dryRun
string
fieldValidation
string
fieldManager
string
Idempotency-Key
string
If-Match
string
Media type application/json

Volume is named storage backed by immutable revisions in the Volume’s own repository: ReadWriteOnce (one writer under a lease), ReadOnlyMany (the latest Ready revision) or ReadWriteMany (each attempt commits its changed paths as a new revision, last writer wins per path).

object
apiVersion
string
kind
string
metadata
object
annotations
object
key
additional properties
string
creationTimestamp
string
deletionGracePeriodSeconds
integer format: int64
deletionTimestamp
string
finalizers
Array<string>
nullable
generateName
string
generation
integer format: int64
labels
object
key
additional properties
string
managedFields
Array<object>
nullable
object
apiVersion
string
fieldsType
string
fieldsV1
object
key
additional properties
manager
string
operation
string
subresource
string
time
string
name
string
namespace
string
ownerReferences
Array<object>
nullable
object
apiVersion
required
string
blockOwnerDeletion
boolean
controller
boolean
kind
required
string
name
required
string
uid
required
string
resourceVersion
string
selfLink
string
uid
string
spec
required

VolumeSpec is a Volume’s shape.

object
accessMode

AccessMode is ReadWriteOnce, ReadOnlyMany or ReadWriteMany; immutable.

string
commitInterval

CommitInterval is how often a ReadWriteOnce or ReadWriteMany mount commits (1m–1h).

string
maxCostUSD

MaxCostUSD caps import and export attempts.

string
revisionHistoryLimit

RevisionHistoryLimit is how many revisions are kept (1–100).

integer format: int32
size

Size caps the logical bytes of a revision; storage is billed on use.

string
source

VolumeSource is exactly one import source.

object
connectionQuery

ConnectionQuerySource is a SQL query exported through a Postgres-type Connection.

object
connection
required

Connection names the Connection.

string
format

Format is Parquet or CSV.

string
sql
required

SQL is the read-only query.

string
git

VolumeGitSource is a git repository.

object
lfs

LFS fetches LFS objects.

boolean
ref

Ref is a branch, tag or commit.

string
repo
required

Repo is the https clone URL.

string
huggingface

HuggingFaceSource is a Hugging Face repository.

object
files

Files are globs limiting the download.

Array<string>
nullable
repo
required

Repo is owner/name.

string
revision

Revision is a 40-hex commit or a tag resolved at admission.

string
secret

Secret holds HF_TOKEN for gated repositories.

string
s3

S3Source is a bucket prefix read through an S3 Connection.

object
connection
required

Connection names the S3 Connection.

string
uri
required

URI is s3://bucket/prefix.

string
upload

VolumeUploadSource marks an upload-filled Volume.

object
url

URLSource is one https file.

object
extract

Extract is Auto (unpack zip and tar archives) or None.

string
sha256

SHA256 is the expected hex digest.

string
url
required

URL is the https address.

string
ttlAfterUnused

TTLAfterUnused deletes the Volume this long after its last mount or upload.

string
status

VolumeStatus is the latest revision and usage.

object
conditions

Conditions are the latest observations.

Array<object>
nullable
object
lastTransitionTime
required
string
message
required
string
observedGeneration
integer format: int64
reason
required
string
status
required
string
type
required
string
holder

VolumeHolder is a ReadWriteOnce Volume’s writer.

object
attempt
required

Attempt is the attempt id.

string
epoch
required

Epoch is the attempt’s fencing epoch.

integer format: int64
kind

Kind and Name are the owning object.

string
name

Name is the owning object’s name.

string
import

VolumeImport describes an import.

object
attempt

Attempt is the internal attempt running the import.

string
bytes

Bytes is how much the import has written so far.

integer format: int64
completionTime

CompletionTime is when the import finished.

string
files

Files is how many files the import has written so far.

integer format: int64
generation

Generation is the spec generation the import is for; a spec change starts a new import.

integer format: int64
sha256

SHA256 is the digest of the downloaded source, once known.

string
startTime

StartTime is when the import started.

string
lastCommitTime

LastCommitTime is the latest revision’s commit time.

string
message

Message is a scrubbed explanation.

string
observedGeneration

ObservedGeneration is the spec generation the status reflects.

integer format: int64
phase

Phase is Pending while creating or importing, Ready or Failed.

string
readers

Readers is the number of attempts mounting it read-only.

integer format: int32
reason

Reason says why the Volume failed, for example ImportFailed.

string
revision

Revision is the latest committed revision.

integer format: int32
storage

VolumeStorage is the repository’s physical size.

object
billedBytes
required

BilledBytes is the part billed after the org’s inclusion.

integer format: int64
bytes
required

Bytes are all kept revisions, deduplicated and compressed.

integer format: int64
used

Used is the logical size of the latest revision.

string
Example generated
{
"apiVersion": "example",
"kind": "example",
"metadata": {
"annotations": {
"additionalProperty": "example"
},
"creationTimestamp": "example",
"deletionGracePeriodSeconds": 1,
"deletionTimestamp": "example",
"finalizers": [
"example"
],
"generateName": "example",
"generation": 1,
"labels": {
"additionalProperty": "example"
},
"managedFields": [
{
"apiVersion": "example",
"fieldsType": "example",
"fieldsV1": {
"additionalProperty": "example"
},
"manager": "example",
"operation": "example",
"subresource": "example",
"time": "example"
}
],
"name": "example",
"namespace": "example",
"ownerReferences": [
{
"apiVersion": "example",
"blockOwnerDeletion": true,
"controller": true,
"kind": "example",
"name": "example",
"uid": "example"
}
],
"resourceVersion": "example",
"selfLink": "example",
"uid": "example"
},
"spec": {
"accessMode": "example",
"commitInterval": "example",
"maxCostUSD": "example",
"revisionHistoryLimit": 1,
"size": "example",
"source": {
"connectionQuery": {
"connection": "example",
"format": "example",
"sql": "example"
},
"git": {
"lfs": true,
"ref": "example",
"repo": "example"
},
"huggingface": {
"files": [
"example"
],
"repo": "example",
"revision": "example",
"secret": "example"
},
"s3": {
"connection": "example",
"uri": "example"
},
"upload": {},
"url": {
"extract": "example",
"sha256": "example",
"url": "example"
}
},
"ttlAfterUnused": "example"
},
"status": {
"conditions": [
{
"lastTransitionTime": "example",
"message": "example",
"observedGeneration": 1,
"reason": "example",
"status": "example",
"type": "example"
}
],
"holder": {
"attempt": "example",
"epoch": 1,
"kind": "example",
"name": "example"
},
"import": {
"attempt": "example",
"bytes": 1,
"completionTime": "example",
"files": 1,
"generation": 1,
"sha256": "example",
"startTime": "example"
},
"lastCommitTime": "example",
"message": "example",
"observedGeneration": 1,
"phase": "example",
"readers": 1,
"reason": "example",
"revision": 1,
"storage": {
"billedBytes": 1,
"bytes": 1
},
"used": "example"
}
}

OK

Media type application/json

Volume is named storage backed by immutable revisions in the Volume’s own repository: ReadWriteOnce (one writer under a lease), ReadOnlyMany (the latest Ready revision) or ReadWriteMany (each attempt commits its changed paths as a new revision, last writer wins per path).

object
apiVersion
string
kind
string
metadata
object
annotations
object
key
additional properties
string
creationTimestamp
string
deletionGracePeriodSeconds
integer format: int64
deletionTimestamp
string
finalizers
Array<string>
nullable
generateName
string
generation
integer format: int64
labels
object
key
additional properties
string
managedFields
Array<object>
nullable
object
apiVersion
string
fieldsType
string
fieldsV1
object
key
additional properties
manager
string
operation
string
subresource
string
time
string
name
string
namespace
string
ownerReferences
Array<object>
nullable
object
apiVersion
required
string
blockOwnerDeletion
boolean
controller
boolean
kind
required
string
name
required
string
uid
required
string
resourceVersion
string
selfLink
string
uid
string
spec
required

VolumeSpec is a Volume’s shape.

object
accessMode

AccessMode is ReadWriteOnce, ReadOnlyMany or ReadWriteMany; immutable.

string
commitInterval

CommitInterval is how often a ReadWriteOnce or ReadWriteMany mount commits (1m–1h).

string
maxCostUSD

MaxCostUSD caps import and export attempts.

string
revisionHistoryLimit

RevisionHistoryLimit is how many revisions are kept (1–100).

integer format: int32
size

Size caps the logical bytes of a revision; storage is billed on use.

string
source

VolumeSource is exactly one import source.

object
connectionQuery

ConnectionQuerySource is a SQL query exported through a Postgres-type Connection.

object
connection
required

Connection names the Connection.

string
format

Format is Parquet or CSV.

string
sql
required

SQL is the read-only query.

string
git

VolumeGitSource is a git repository.

object
lfs

LFS fetches LFS objects.

boolean
ref

Ref is a branch, tag or commit.

string
repo
required

Repo is the https clone URL.

string
huggingface

HuggingFaceSource is a Hugging Face repository.

object
files

Files are globs limiting the download.

Array<string>
nullable
repo
required

Repo is owner/name.

string
revision

Revision is a 40-hex commit or a tag resolved at admission.

string
secret

Secret holds HF_TOKEN for gated repositories.

string
s3

S3Source is a bucket prefix read through an S3 Connection.

object
connection
required

Connection names the S3 Connection.

string
uri
required

URI is s3://bucket/prefix.

string
upload

VolumeUploadSource marks an upload-filled Volume.

object
url

URLSource is one https file.

object
extract

Extract is Auto (unpack zip and tar archives) or None.

string
sha256

SHA256 is the expected hex digest.

string
url
required

URL is the https address.

string
ttlAfterUnused

TTLAfterUnused deletes the Volume this long after its last mount or upload.

string
status

VolumeStatus is the latest revision and usage.

object
conditions

Conditions are the latest observations.

Array<object>
nullable
object
lastTransitionTime
required
string
message
required
string
observedGeneration
integer format: int64
reason
required
string
status
required
string
type
required
string
holder

VolumeHolder is a ReadWriteOnce Volume’s writer.

object
attempt
required

Attempt is the attempt id.

string
epoch
required

Epoch is the attempt’s fencing epoch.

integer format: int64
kind

Kind and Name are the owning object.

string
name

Name is the owning object’s name.

string
import

VolumeImport describes an import.

object
attempt

Attempt is the internal attempt running the import.

string
bytes

Bytes is how much the import has written so far.

integer format: int64
completionTime

CompletionTime is when the import finished.

string
files

Files is how many files the import has written so far.

integer format: int64
generation

Generation is the spec generation the import is for; a spec change starts a new import.

integer format: int64
sha256

SHA256 is the digest of the downloaded source, once known.

string
startTime

StartTime is when the import started.

string
lastCommitTime

LastCommitTime is the latest revision’s commit time.

string
message

Message is a scrubbed explanation.

string
observedGeneration

ObservedGeneration is the spec generation the status reflects.

integer format: int64
phase

Phase is Pending while creating or importing, Ready or Failed.

string
readers

Readers is the number of attempts mounting it read-only.

integer format: int32
reason

Reason says why the Volume failed, for example ImportFailed.

string
revision

Revision is the latest committed revision.

integer format: int32
storage

VolumeStorage is the repository’s physical size.

object
billedBytes
required

BilledBytes is the part billed after the org’s inclusion.

integer format: int64
bytes
required

Bytes are all kept revisions, deduplicated and compressed.

integer format: int64
used

Used is the logical size of the latest revision.

string
Example generated
{
"apiVersion": "example",
"kind": "example",
"metadata": {
"annotations": {
"additionalProperty": "example"
},
"creationTimestamp": "example",
"deletionGracePeriodSeconds": 1,
"deletionTimestamp": "example",
"finalizers": [
"example"
],
"generateName": "example",
"generation": 1,
"labels": {
"additionalProperty": "example"
},
"managedFields": [
{
"apiVersion": "example",
"fieldsType": "example",
"fieldsV1": {
"additionalProperty": "example"
},
"manager": "example",
"operation": "example",
"subresource": "example",
"time": "example"
}
],
"name": "example",
"namespace": "example",
"ownerReferences": [
{
"apiVersion": "example",
"blockOwnerDeletion": true,
"controller": true,
"kind": "example",
"name": "example",
"uid": "example"
}
],
"resourceVersion": "example",
"selfLink": "example",
"uid": "example"
},
"spec": {
"accessMode": "example",
"commitInterval": "example",
"maxCostUSD": "example",
"revisionHistoryLimit": 1,
"size": "example",
"source": {
"connectionQuery": {
"connection": "example",
"format": "example",
"sql": "example"
},
"git": {
"lfs": true,
"ref": "example",
"repo": "example"
},
"huggingface": {
"files": [
"example"
],
"repo": "example",
"revision": "example",
"secret": "example"
},
"s3": {
"connection": "example",
"uri": "example"
},
"upload": {},
"url": {
"extract": "example",
"sha256": "example",
"url": "example"
}
},
"ttlAfterUnused": "example"
},
"status": {
"conditions": [
{
"lastTransitionTime": "example",
"message": "example",
"observedGeneration": 1,
"reason": "example",
"status": "example",
"type": "example"
}
],
"holder": {
"attempt": "example",
"epoch": 1,
"kind": "example",
"name": "example"
},
"import": {
"attempt": "example",
"bytes": 1,
"completionTime": "example",
"files": 1,
"generation": 1,
"sha256": "example",
"startTime": "example"
},
"lastCommitTime": "example",
"message": "example",
"observedGeneration": 1,
"phase": "example",
"readers": 1,
"reason": "example",
"revision": 1,
"storage": {
"billedBytes": 1,
"bytes": 1
},
"used": "example"
}
}

An error: a metav1.Status whose reason is a registered code.

Media type application/json

Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).

object
apiVersion
string
code
integer format: int32
details
object
causes
Array<object>
nullable
object
field
string
message
string
reason
string
group
string
kind
string
name
string
retryAfterSeconds
integer format: int32
uid
string
docs

Docs is the URL of the code’s docs page.

string
fix

Fix says what to do next, for example a CLI command or the field to change.

string
kind
string
message
string
metadata
object
continue
string
remainingItemCount
integer format: int64
resourceVersion
string
selfLink
string
shardInfo
object
selector
required
string
reason
string
requestId

RequestID identifies the request in logs and support tickets.

string
status
string
Example generated
{
"apiVersion": "example",
"code": 1,
"details": {
"causes": [
{
"field": "example",
"message": "example",
"reason": "example"
}
],
"group": "example",
"kind": "example",
"name": "example",
"retryAfterSeconds": 1,
"uid": "example"
},
"docs": "example",
"fix": "example",
"kind": "example",
"message": "example",
"metadata": {
"continue": "example",
"remainingItemCount": 1,
"resourceVersion": "example",
"selfLink": "example",
"shardInfo": {
"selector": "example"
}
},
"reason": "example",
"requestId": "example",
"status": "example"
}