Skip to content

API Reference

Packages:

pkg.internal/v1beta2

Resource Types:

Datalab

↩ Parent

A Datalab is a tenant-facing, namespaced composite resource. It defines membership, sessions, and data services.

Name Type Description Required
apiVersion string pkg.internal/v1beta2 true
kind string Datalab true
metadata object Refer to the Kubernetes API documentation for the fields of the `metadata` field. true
spec object Desired configuration of the datalab.
true
status object Current observed state of the datalab.
false

Datalab.spec

↩ Parent

Desired configuration of the datalab.

Name Type Description Required
users []string Users associated with this datalab.

Default: []
true
cacheStores map[string]object Optional cache stores for this datalab, implemented via Redis and managed through the Redis Kubernetes operator.

Validations:
  • self.all(k, size(k) <= 63 && k.matches('^[a-z]([a-z0-9-]*[a-z0-9])?$')): Instance names must start with a lowercase letter, contain only lowercase letters, digits, or hyphens, end with a letter or digit, and have at most 63 characters.
  • Default: map[]
    false
    databases map[string]object Optional PostgreSQL hosts (PostgresCluster instances) to provision for this datalab. Each host defines a data volume size and an optional pgBackRest repository size, plus a list of logical PostgreSQL databases to create inside that cluster. Ownership and privileges are derived from spec.users by the Composition.

    Validations:
  • self.all(k, size(k) <= 63 && k.matches('^[a-z]([a-z0-9-]*[a-z0-9])?$')): Instance names must start with a lowercase letter, contain only lowercase letters, digits, or hyphens, end with a letter or digit, and have at most 63 characters.
  • Default: map[]
    false
    documentStores map[string]object Optional document stores for this datalab, implemented via MongoDB and managed through the MongoDB Kubernetes operator.

    Validations:
  • self.all(k, size(k) <= 63 && k.matches('^[a-z]([a-z0-9-]*[a-z0-9])?$')): Instance names must start with a lowercase letter, contain only lowercase letters, digits, or hyphens, end with a letter or digit, and have at most 63 characters.
  • Default: map[]
    false
    sessions []object Sessions declared for this datalab.

    Default: []
    false
    userOverrides map[string]object Optional per-user override configuration.

    Default: map[]
    false
    vclusters map[string]object

    Validations:
  • self.all(k, size(k) <= 63 && k.matches('^[a-z]([a-z0-9-]*[a-z0-9])?$')): Instance names must start with a lowercase letter, contain only lowercase letters, digits, or hyphens, end with a letter or digit, and have at most 63 characters.
  • Default: map[]
    false

    Datalab.spec.cacheStores[key]

    ↩ Parent

    Name Type Description Required
    storage string Storage size for Redis persistent data volume as a Kubernetes quantity (e.g., "1Gi", "10Gi"). Effective default: "1Gi".
    true
    type enum Service type.

    Enum: redis
    Default: redis
    true
    backupStorage string Storage size for the Redis backup PVC as a Kubernetes quantity. A positive value enables daily full RDB snapshots. Zero or an omitted value disables backups.

    Default: 0
    false

    Datalab.spec.databases[key]

    ↩ Parent

    Name Type Description Required
    names []string Logical PostgreSQL database names to create within this host (e.g., "prod", "dev").
    true
    storage string Storage size for the PostgreSQL data PVC of this PostgresCluster as a Kubernetes quantity (e.g., "1Gi", "10Gi").
    true
    type enum Service type.

    Enum: postgres
    Default: postgres
    true
    backupStorage string Storage size for the pgBackRest repository PVC (backup volume, including WAL archive) as a Kubernetes quantity (e.g., "10Gi", "100Gi"). Zero or an omitted value disables backups.

    Default: 0
    false

    Datalab.spec.documentStores[key]

    ↩ Parent

    Name Type Description Required
    storage string Storage size for MongoDB persistent data volume as a Kubernetes quantity (e.g., "5Gi", "20Gi"). Effective default: "10Gi".
    true
    type enum Service type.

    Enum: mongo
    Default: mongo
    true
    backupStorage string Storage size for the MongoDB backup PVC as a Kubernetes quantity. A positive value enables daily full backups with mongodump and the oplog. Zero or an omitted value disables backups.

    Default: 0
    false

    Datalab.spec.sessions[index]

    ↩ Parent

    Name Type Description Required
    name string Session name.
    true
    state enum Desired runtime lifecycle for this session. Started sessions create an active runtime session. Stopped sessions keep their Datalab-owned workspace PVC but do not create a runtime.

    Enum: started, stopped
    Default: started
    false

    Datalab.spec.userOverrides[key]

    ↩ Parent

    Name Type Description Required
    grantedAt string RFC3339 timestamp indicating when the role became active.

    Format: date-time
    false
    role enum Assigned role for the user.

    Enum: admin, user
    false

    Datalab.spec.vclusters[key]

    ↩ Parent

    Virtual Kubernetes clusters keyed by instance name.

    Name Type Description Required
    groups []object Additional profiles granted to Datalab users and administrators. Only Datalab administrators receive the built-in cluster-admin profile.
    false
    secretBindings []object Datalab connection Secrets to sync into this virtual cluster.

    Default: []
    false
    storage string Control-plane PVC size. The environment default is used when omitted.
    false

    Datalab.spec.vclusters[key].groups[index]

    ↩ Parent

    Name Type Description Required
    name string Profile name used for its Keycloak role and connection set.
    true
    namespace string Virtual namespace to create, or '*' for virtual cluster administration.

    Validations:
  • self != "default" && !self.startsWith("kube-"): Select a workload namespace, not a Kubernetes system namespace.
  • true
    role enum Kubernetes ClusterRole granted to this profile.

    Enum: view, edit, admin, cluster-admin
    true

    Datalab.spec.vclusters[key].secretBindings[index]

    ↩ Parent

    Name Type Description Required
    name string Service instance, primary for storage, or a predefined custom Secret name.
    true
    target object
    true
    type enum Datalab connection type.

    Enum: s3, postgres, mongo, redis, registry, custom
    true

    Datalab.spec.vclusters[key].secretBindings[index].target

    ↩ Parent

    Name Type Description Required
    name string
    true
    namespace string
    true

    Datalab.status

    ↩ Parent

    Current observed state of the datalab.

    Name Type Description Required
    connections []object Service and virtual API connection metadata. Managed service and custom connections are ready when their published Secret in the Datalab namespace matches the available source. Readiness does not confirm delivery into a virtual cluster or caller authorization.
    false
    oauth2 []object OAuth2 discovery by client ID. Contains metadata and Secret references only.
    false
    sessions []object Session lifecycle state, persistent storage requests, workspace PVC references, and runtime details.
    false

    Datalab.status.connections[index]

    ↩ Parent

    Name Type Description Required
    name string
    true
    ready boolean
    true
    secretRef object
    true
    type enum

    Enum: s3, postgres, mongo, redis, registry, custom, vcluster
    true
    endpoint string
    false
    group string
    false
    instance string
    false
    region string S3 region, when configured.
    false
    role string
    false
    targetNamespace string
    false

    Datalab.status.connections[index].secretRef

    ↩ Parent

    Name Type Description Required
    name string
    true
    namespace string
    true

    Datalab.status.oauth2[index]

    ↩ Parent

    Name Type Description Required
    issuerUrl string
    true
    name string OAuth2 client ID.
    true
    ready boolean
    true
    secretRef object
    true
    type enum

    Enum: client
    true

    Datalab.status.oauth2[index].secretRef

    ↩ Parent

    Name Type Description Required
    name string
    true
    namespace string
    true

    Datalab.status.sessions[index]

    ↩ Parent

    Observed state of a single datalab session.

    Name Type Description Required
    name string Session name from spec.sessions.
    true
    pvcRef object Workspace PVC reference. Does not report PVC readiness.
    true
    state enum Desired lifecycle state for the declared session.

    Enum: started, stopped
    true
    message string Latest observed status message for the session runtime.
    false
    phase string Latest observed lifecycle phase for the session runtime.
    false
    pvcSize string Persistent session PVC request as a Kubernetes quantity. Retained while stopped, zero when none, and omitted when unknown. Shared PVCs are counted once.
    false
    url string Public URL of the active session.
    false

    Datalab.status.sessions[index].pvcRef

    ↩ Parent

    Workspace PVC reference. Does not report PVC readiness.

    Name Type Description Required
    name string
    true
    namespace string
    true