Skip to main content

Workspaces (Enterprise)

A shared Ilum installation serves several teams. Without workspaces, every team submits to the same default cluster, which reads object storage with one key, so every user's code can read every team's data. A workspace gives a team its own Spark namespace, storage key, buckets, cluster and history server, and lets only the team's Ilum groups use them.

Workspaces are declared in the Helm values (global.workspaces). The chart creates the Kubernetes side, and ilum-core keeps a cluster and a storage record per workspace in line with the list. Around them, Ilum's own components read object storage with narrow keys of their own, ilum-core runs with restricted Kubernetes permissions, and an admission policy keeps pods that run user code within the rights of their workspace.

This page describes the whole model. Notebooks and Airflow with workspaces are described in JupyterHub with workspaces and Airflow with workspaces.

How It Works​

A workspace <name> consists of:

PartCreated byDefault
Spark namespace, with the driver service account and its RoleHelmilum-ws-<name>, account ilum-spark-driver
Notebook namespace (with JupyterHub)Helmilum-ws-<name>-nb
Storage key in a Secret of the Spark namespaceHelm (generated) or the operator (storage.existingSecret)ilum-ws-<name>-storage
Buckets (Spark and data)the provisioning Job (MinIO, RustFS) or the operatorilum-ws-<name>, ilum-ws-<name>-data
NetworkPolicy: traffic into the namespace only from itself and the release namespaceHelmon
History server reading the workspace's event logsHelmon, at /external/history-server/<name>/
Cluster <name> and storage workspace-<name>, with access lists from groupsilum-core
Airflow service user svc-airflow-<name> and connection ilum_livy_<name> (with Airflow)ilum-core, Helm
JupyterHub profile (with JupyterHub)the hub, from ilum-core

Records that ilum-core keeps for a workspace are managed: changes through the API are refused (409), so a workspace cluster cannot be linked to another storage. Jobs on a workspace cluster run in its namespace with its driver account, keep their event logs and job resources in the workspace's Spark bucket and reach the data bucket with the workspace key only. Who may submit to a workspace cluster or run SQL on it is decided by its access lists; see Cluster access lists.

Prerequisites​

  • An Ilum Enterprise license.
  • Kubernetes 1.30 or later for the admission policy; on older clusters, see Pod guard on older clusters.
  • The Ilum groups of each team, in the internal user store, LDAP or OAuth2.
  • Object storage on MinIO or RustFS (the chart creates keys and users), or on Ceph RGW or another S3 store (create the keys yourself).
  • Governed mode is recommended: helm_aio/values-governed.yaml turns it on, and with it the restricted permissions and the admission policy described below; see Governed mode.

Configuration​

global:
workspaces:
- name: hr
groups: [ hr-analysts ]
- name: finance
groups: [ finance ]
sqlGroups: [ finance, auditors ]
storage:
endpoint: "http://rgw.storage.svc.cluster.local:8080"
existingSecret: finance-storage-key
NameDescriptionDefault
nameWorkspace name, a DNS label of at most 40 characters
groupsIlum groups that may submit work and run SQL
submitGroups, sqlGroupsSeparate lists for submissions and SQL; each replaces groups for its purposegroups
namespaceSpark namespaceilum-ws-<name>
notebookNamespaceNamespace of the notebook servers<namespace>-nb
serviceAccountNameDriver service accountglobal.workspaceDefaults.serviceAccountName
sparkImage, metastoreName, presets, defaultApplicationConfigCluster settingsthe default cluster's
storage.endpoint, storage.regionS3 endpoint and region of the workspace bucketsthe platform storage
storage.sparkBucket, storage.dataBucket, storage.extraBucketsBuckets of the workspaceilum-ws-<name>, ilum-ws-<name>-data
storage.existingSecret, storage.accessKeyKey, storage.secretKeyKeySecret in the Spark namespace with the workspace key; empty: generated and provisioned"", access-key, secret-key
deletionProtectionRefuse to remove the workspacetrue

Settings shared by all workspaces are under global.workspaceSettings:

NameDescriptionDefault
allowEmptyLet an empty list remove every workspacefalse
resyncSecondsHow often ilum-core reconciles the workspaces300
networkPolicy.enabledNetworkPolicy of each workspace namespacetrue
historyServer.enabledA history server per workspacetrue
provisioning.enabled, provisioning.rootSecretCreate buckets and a user per workspace with the root key of this Secrettrue, ilum-objectstorage-credentials

Storage Keys​

Each workspace has a key limited to its own buckets. With MinIO or RustFS and no storage.existingSecret, the chart generates the key once, keeps it across upgrades, and a Job creates the buckets and a user with a policy limited to them. With Ceph RGW, policy-sync or ExternalSecrets, create the buckets and a key limited to them, store the key in a Secret in the workspace's Spark namespace and name it in storage.existingSecret.

Ilum's own components read object storage with narrow keys too, the object-storage identities: platform for ilum-core and the default cluster, history for the history servers, ducklake for DuckLake, kestra for Kestra and airflowLogs for Airflow's task logs. In governed mode each component that is on needs its identity; the render fails otherwise. See Object-storage identities.

The history servers of workspaces read with the history key, which may list the Spark buckets and read and delete event logs under ilum/logs, but not read data. With generate, this covers the workspaces whose key the chart provisions; a workspace that brings its own key (storage.existingSecret) keeps reading with that key. With existingSecret, it covers every workspace once the same Secret exists in each workspace namespace. The Secret is kept in the workspace namespace, where only the history server uses it: drivers cannot read Secrets, and the pod guard refuses a pod that mounts it.

In a DuckDB session each storage key applies only to its storage's buckets, and the DuckLake key only to the DuckLake data path.

Notebooks and Airflow​

  • JupyterHub signs users in with their Ilum account and starts their notebook servers only in workspaces whose cluster admits them. A server runs in the workspace's notebook namespace without a Kubernetes token and opens Spark sessions on the workspace cluster as the user, with a personal access token that lives as long as the server. The Community Jupyter (ilum-jupyter) is refused in governed mode. See JupyterHub with workspaces.
  • Airflow holds no platform storage key in governed mode. DAGs submit Spark through one Livy connection per workspace, signed in as the workspace's service user, so a DAG cannot start work on a cluster its workspace may not use. See Airflow with workspaces.

Kubernetes Permissions​

In restricted mode, ilum-core has no cluster-wide role except reading nodes, node metrics and its own namespaces:

Whereilum-core may
Clusterlist nodes and node metrics; get the release namespace and the workspace namespaces
Release namespacerun Spark and schedules (pods, services, config maps, volume claims, CronJobs, Jobs, quotas); read only the Secrets that storages reference: the platform key and rbac.restricted.secretNames
Each workspace namespacethe same for Spark, read pod metrics, and read only the workspace key

Restricted mode is on in governed mode, and can be turned on alone:

ilum-core:
rbac:
restricted:
enabled: true
# Other Secrets of the release namespace that storages reference
secretNames: []

In restricted mode, Spark runs only in the release namespace and in workspace namespaces: ilum-core can no longer create a namespace for a new cluster, and kubernetes.defaultCluster.namespace must be empty or the release namespace. Cluster usage across all namespaces is not shown.

The management API (ilum-api) runs helm upgrade of the release, which holds cluster-wide objects (ClusterRoles, the admission policy, the workspace namespaces) and objects in the workspace namespaces. An account that can apply them can also grant itself any right, so ilum-api's ClusterRole grants every verb on every resource, and a namespaced Role (ilum-api.rbac.clusterScope: false) cannot apply the release. In governed mode the render fails while that ClusterRole is rendered: values-governed.yaml turns ilum-api off, and modules are changed with Helm by an operator. To keep module management, set ilum-api.enabled: true and ilum-api.rbac.allowInGovernedMode: true after values-governed.yaml, which accepts an account with cluster-wide rights.

Kestra runs under its own service account ilum-kestra without a Kubernetes token in values-governed.yaml.

Pod Guard​

User code reaches the Kubernetes API in a few places: a Spark driver creates its executors, the Airflow scheduler builds a task pod from a DAG's pod_override, an Airflow task may launch pods, and a notebook could if it had a token. Without a check, such code could start a pod under ilum-core's account, mount the root key of the object storage, or reach the node.

The admission policy ilum-pod-guard-<release namespace> (a ValidatingAdmissionPolicy with its binding) checks every pod created or changed in the release namespace and in the workspace and notebook namespaces by an account that runs user code, and the pod template of every Deployment, StatefulSet, DaemonSet, ReplicaSet, ReplicationController, Job and CronJob such an account creates or changes:

AccountPods may run asPods may reference the SecretsVolume claims
The default cluster's driver accountitself, defaultthe platform key, podGuard.defaultClusterSecretsnone
Every account of a workspace namespacethe workspace's driver account, defaultthe workspace keyany of the namespace
Every account of a notebook namespacedefaultnoneany of the namespace
Airflow's scheduler, workers, triggerer and DAG processorAirflow's worker accounts, defaultAirflow's own (ilum-airflow-*, the Git and OpenMetadata Secrets, and the remote-logs key and workspace tokens under the names set in global)Airflow's (ilum-airflow-*)

Such a pod is refused when it:

  • runs as ilum-core's account or another platform account (ilum-api, the JupyterHub hub, Kyuubi, the Airflow scheduler), or as any account not listed for its creator;
  • references a Secret outside the list, in a volume, a projected volume, env or envFrom in any container, or as an image pull Secret;
  • uses the host network, PID or IPC namespace or a host port;
  • runs a privileged container, allows privilege escalation (allowPrivilegeEscalation: true) or adds a capability outside the baseline set of the Pod Security Standards (AUDIT_WRITE, CHOWN, DAC_OVERRIDE, FOWNER, FSETID, KILL, MKNOD, NET_BIND_SERVICE, SETFCAP, SETGID, SETPCAP, SETUID, SYS_CHROOT; the stricter restricted profile allows only NET_BIND_SERVICE);
  • uses a volume other than configMap, downwardAPI, emptyDir, projected, secret and the volume claims listed for its creator; ephemeral volumes only where any claim of the namespace is allowed (workspace and notebook namespaces), because a claim template can clone another claim.

The same accounts may not exec, attach or port-forward into pods of the release namespace. A refusal names the policy, the account and the rule:

ValidatingAdmissionPolicy 'ilum-pod-guard-ilum' with binding 'ilum-pod-guard-ilum' denied request: ilum-pod-guard-ilum: pods made by
system:serviceaccount:ilum-ws-hr:ilum-spark-driver may mount only the Secrets ilum-ws-hr-storage

Why the policy matches the requesting account​

The policy decides by who sends the request, not by the pod's service account or its namespace alone:

  • Matching on the pod's service account cannot work: the attack is a pod that names a privileged account, so the rule must apply to the creator, whatever account the pod asks for.
  • Matching on the namespace alone would also stop ilum-core, the JupyterHub hub and the Airflow scheduler's own pods in the release namespace, which legitimately run under platform accounts and mount platform Secrets.
  • The requesting account is who acts for user code: Spark executors are created by the driver's account, a notebook or task calling the API uses the pod's own account. The scheduler is matched as well, because a DAG's pod_override shapes the pods it creates.
  • A pod of a Deployment, Job or other workload is requested by its Kubernetes controller, not by the account that wrote the workload, so the policy checks the pod template when a matched account writes the workload. Matching the controllers instead would check every workload of the cluster, platform ones included. None of the matched accounts has rights on workloads in the chart's RBAC today; the check keeps that true if RBAC is widened later.

Pods that ilum-core creates (drivers, spark-submit pods) and pods the hub creates (notebook servers) are not matched: they are built from platform settings. What users may set in a Spark job's configuration is checked by the job configuration guard instead; see Job configuration guard. A cluster that signs in to Kubernetes with its own credentials (an external cluster) is not covered by this policy.

Configuration​

The policy is on in governed mode on Kubernetes 1.30 or later; on an older cluster the render fails until podGuard.external is set. It can be turned on alone with ilum-core.podGuard.enabled. The render also fails while ilum-core.kubernetes.defaultCluster.namespace names another namespace than the release's, because the policy matches the default cluster's drivers in the release namespace only. The all-in-one chart lists Airflow's accounts and the platform accounts; the block below is shortened, the full lists are in helm_aio/values.yaml under ilum-core.podGuard:

ilum-core:
podGuard:
enabled: false # governed mode turns it on
external: false # the rules are enforced another way: render no policy
forbiddenServiceAccounts: [ ilum-api, ilum-jupyterhub-hub, ilum-sql, ilum-airflow-scheduler ] # shortened
defaultClusterSecrets: []
userCode:
- serviceAccount: ilum-airflow-scheduler
serviceAccounts: [ ilum-airflow-worker, ilum-airflow-worker-kubernetes, default ]
secrets: [ "ilum-airflow-*", ilum-git-credentials, ilum-om-bot-tokens, ilum-openmetadata-admin ] # shortened
volumeClaims: [ "ilum-airflow-*" ]
# the same for ilum-airflow-worker, ilum-airflow-worker-kubernetes, ilum-airflow-triggerer and ilum-airflow-dag-processor
warning

Helm replaces lists. A values file that sets ilum-core.podGuard.userCode or forbiddenServiceAccounts must repeat every entry of the chart's lists and add its own; a userCode without Airflow's entries would leave Airflow's task pods unchecked, so the all-in-one chart fails the render while Airflow is on and one of its accounts has no entry. The entries follow airflow.fullnameOverride (ilum-airflow): change them with it.

NameDescriptionDefault
podGuard.enabledRender the policy; governed mode turns it onfalse
podGuard.externalRender no policy, also in governed mode (another engine enforces the rules)false
podGuard.forbiddenServiceAccountsAccounts of the release namespace no such pod may run as, besides ilum-core'sAirflow scheduler, ilum-api, hub, Kyuubi (all-in-one chart)
podGuard.defaultClusterSecretsSecrets the default cluster's executors may reference besides the platform key and rbac.restricted.secretNames[]
podGuard.userCodeOther accounts of the release namespace whose pods run user code: serviceAccount, serviceAccounts, secrets, volumeClaims (a trailing * matches a prefix)Airflow's accounts (all-in-one chart)

The default cluster's drivers need an account of their own (kubernetes.driverServiceAccount, on by default); the render fails while they run under ilum-core's account.

note

A Spark job of the default cluster that mounts a PersistentVolumeClaim, or a DAG that runs pods under its own service account, with its own Secrets or with another volume claim, is refused. Run such work in a workspace, add an entry for the account and its Secrets to podGuard.userCode (with the chart's entries, see above), or list the Secrets of other storages of the default cluster in rbac.restricted.secretNames, which ilum-core then reads and the default cluster's executors may mount.

Pod Guard on Older Clusters​

On Kubernetes older than 1.30, enforce the same rules with another admission engine and set ilum-core.podGuard.external: true. The following Kyverno ClusterPolicy (Kyverno 1.19 or earlier; Kyverno 1.20 runs only its CEL policy types) covers the default cluster's drivers, one workspace (hr) and Airflow, for the release ilum in the namespace ilum. Add a rule like workspace-hr for each workspace and its notebook namespace, and adjust the names to your release; add both namespaces' groups to no-exec-in-release-namespace too. It checks pods only: the pod templates of workloads, capabilities, host ports, privilege escalation, image pull Secrets and the pod rules of the notebook namespaces are left out of the example, and ephemeral volumes are allowed only in the workspace rule.

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: ilum-pod-guard
spec:
validationFailureAction: Enforce
background: false
rules:
- name: default-cluster-drivers
match:
any:
- resources:
kinds: [ Pod ]
operations: [ CREATE, UPDATE ]
namespaces: [ ilum ]
subjects:
- { kind: ServiceAccount, name: ilum-ilum-core-spark-driver, namespace: ilum }
validate:
message: >-
ilum-pod-guard: pods of the default cluster's drivers may run only as ilum-ilum-core-spark-driver or default, reference only the
Secret ilum-platform-storage, and use no host namespace, privileged container, node volume or volume claim
deny:
conditions:
any:
- key: "{{ request.object.spec.serviceAccountName || 'default' }}"
operator: AnyNotIn
value: [ ilum-ilum-core-spark-driver, default ]
- key: "{{ request.object.spec.volumes[].keys(@)[] || `[]` }}"
operator: AnyNotIn
value: [ name, configMap, downwardAPI, emptyDir, projected, secret ]
- key: "{{ request.object.spec.volumes[].secret.secretName || `[]` }}"
operator: AnyNotIn
value: [ ilum-platform-storage ]
- key: "{{ request.object.spec.volumes[].projected.sources[].secret.name || `[]` }}"
operator: AnyNotIn
value: [ ilum-platform-storage ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].env[].valueFrom.secretKeyRef.name || `[]` }}"
operator: AnyNotIn
value: [ ilum-platform-storage ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].envFrom[].secretRef.name || `[]` }}"
operator: AnyNotIn
value: [ ilum-platform-storage ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].securityContext.privileged || `[]` }}"
operator: AnyIn
value: [ true ]
- key: "{{ [request.object.spec.hostNetwork, request.object.spec.hostPID, request.object.spec.hostIPC] }}"
operator: AnyIn
value: [ true ]
- name: workspace-hr
match:
any:
- resources:
kinds: [ Pod ]
operations: [ CREATE, UPDATE ]
namespaces: [ ilum-ws-hr ]
subjects:
- { kind: Group, name: "system:serviceaccounts:ilum-ws-hr" }
validate:
message: >-
ilum-pod-guard: pods of workspace hr may run only as ilum-spark-driver or default, reference only the Secret ilum-ws-hr-storage, and
use no host namespace, privileged container or node volume
deny:
conditions:
any:
- key: "{{ request.object.spec.serviceAccountName || 'default' }}"
operator: AnyNotIn
value: [ ilum-spark-driver, default ]
- key: "{{ request.object.spec.volumes[].keys(@)[] || `[]` }}"
operator: AnyNotIn
value: [ name, configMap, downwardAPI, emptyDir, ephemeral, projected, secret, persistentVolumeClaim ]
- key: "{{ request.object.spec.volumes[].secret.secretName || `[]` }}"
operator: AnyNotIn
value: [ ilum-ws-hr-storage ]
- key: "{{ request.object.spec.volumes[].projected.sources[].secret.name || `[]` }}"
operator: AnyNotIn
value: [ ilum-ws-hr-storage ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].env[].valueFrom.secretKeyRef.name || `[]` }}"
operator: AnyNotIn
value: [ ilum-ws-hr-storage ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].envFrom[].secretRef.name || `[]` }}"
operator: AnyNotIn
value: [ ilum-ws-hr-storage ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].securityContext.privileged || `[]` }}"
operator: AnyIn
value: [ true ]
- key: "{{ [request.object.spec.hostNetwork, request.object.spec.hostPID, request.object.spec.hostIPC] }}"
operator: AnyIn
value: [ true ]
- name: airflow
match:
any:
- resources:
kinds: [ Pod ]
operations: [ CREATE, UPDATE ]
namespaces: [ ilum ]
subjects:
- { kind: ServiceAccount, name: ilum-airflow-scheduler, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-worker, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-worker-kubernetes, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-triggerer, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-dag-processor, namespace: ilum }
validate:
message: >-
ilum-pod-guard: pods of Airflow may run only as ilum-airflow-worker, ilum-airflow-worker-kubernetes or default, reference only Airflow's Secrets and volume claims,
and use no host namespace, privileged container or node volume
deny:
conditions:
any:
- key: "{{ request.object.spec.serviceAccountName || 'default' }}"
operator: AnyNotIn
value: [ ilum-airflow-worker, ilum-airflow-worker-kubernetes, default ]
- key: "{{ request.object.spec.volumes[].keys(@)[] || `[]` }}"
operator: AnyNotIn
value: [ name, configMap, downwardAPI, emptyDir, projected, secret, persistentVolumeClaim ]
- key: "{{ request.object.spec.volumes[].persistentVolumeClaim.claimName || `[]` }}"
operator: AnyNotIn
value: [ "ilum-airflow-*" ]
- key: "{{ request.object.spec.volumes[].secret.secretName || `[]` }}"
operator: AnyNotIn
value: [ "ilum-airflow-*", ilum-git-credentials, ilum-om-bot-tokens, ilum-openmetadata-admin ]
- key: "{{ request.object.spec.volumes[].projected.sources[].secret.name || `[]` }}"
operator: AnyNotIn
value: [ "ilum-airflow-*", ilum-git-credentials, ilum-om-bot-tokens, ilum-openmetadata-admin ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].env[].valueFrom.secretKeyRef.name || `[]` }}"
operator: AnyNotIn
value: [ "ilum-airflow-*", ilum-git-credentials, ilum-om-bot-tokens, ilum-openmetadata-admin ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].envFrom[].secretRef.name || `[]` }}"
operator: AnyNotIn
value: [ "ilum-airflow-*", ilum-git-credentials, ilum-om-bot-tokens, ilum-openmetadata-admin ]
- key: "{{ request.object.spec.[containers, initContainers, ephemeralContainers][][].securityContext.privileged || `[]` }}"
operator: AnyIn
value: [ true ]
- key: "{{ [request.object.spec.hostNetwork, request.object.spec.hostPID, request.object.spec.hostIPC] }}"
operator: AnyIn
value: [ true ]
- name: no-exec-in-release-namespace
match:
any:
- resources:
kinds: [ Pod/exec, Pod/attach, Pod/portforward ]
operations: [ CONNECT ]
namespaces: [ ilum ]
subjects:
- { kind: ServiceAccount, name: ilum-ilum-core-spark-driver, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-scheduler, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-worker, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-worker-kubernetes, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-triggerer, namespace: ilum }
- { kind: ServiceAccount, name: ilum-airflow-dag-processor, namespace: ilum }
# every account of each workspace namespace and its notebook namespace
- { kind: Group, name: "system:serviceaccounts:ilum-ws-hr" }
- { kind: Group, name: "system:serviceaccounts:ilum-ws-hr-nb" }
validate:
message: "ilum-pod-guard: this account may not exec, attach or port-forward into pods of the release namespace"
deny: {}

Removing a Workspace​

Removal takes two upgrades, so that a typing error cannot remove a team's workspace:

  1. Set deletionProtection: false on the entry and apply.
  2. Remove the entry and apply. Stop the notebook servers of the workspace first; the render fails while one still runs.

ilum-core then removes the workspace's cluster, storage record and service user, and Helm removes its Roles, NetworkPolicies, Secrets and history server. The namespaces are kept (helm.sh/resource-policy: keep), and the data stays in the buckets. Delete them by hand when they are no longer needed.

Limits​

  • Shared zones. One Airflow serves all workspaces: a DAG can read the connection of another workspace, and only the service user's rights and the audit trail limit what it can do with it. The Hive Metastore and Trino are shared as well; access to their tables is decided by Apache Ranger policies, see Apache Ranger.
  • Other components. MLflow, the Hive Metastore, Trino, Nessie, Langfuse, Loki, Tempo and the other bundled modules still read the shared object-storage Secret ilum-objectstorage-credentials.
  • DuckDB runs inside ilum-core. A DuckDB session uses only the keys of its cluster's storages, and in governed mode its files, settings and network are locked down; see DuckDB session lockdown.
  • The history key reads the event logs of the workspaces that use it (see Storage Keys) on its store. It is kept in those workspace namespaces, readable by the history server only.
  • Pod guard. It needs Kubernetes 1.30 or later, or another admission engine. It does not cover clusters that sign in to Kubernetes with their own credentials.
  • Removal keeps namespaces and data, see Removing a workspace. The deletion check reads the cluster with lookup, so it does not run with helm template or Argo CD.