Skip to main content

SparkCluster

Spark compute for the platform, a team or one person: size, runtime, settings; started by hand, stopped when idle.

Spec​

FieldTypeRequiredDefaultDescriptionConstraints
spec.displayNamestring (nullable)Nomax 100
spec.driverobject (nullable)NoThe pod shape of a driver or an executor. Absent fields follow the size class.
spec.driver.coresinteger (nullable)Nomin 1, max 16; format int32
spec.driver.memorystring (nullable)NoFor example 4Gi.pattern ^[1-9][0-9]*(Mi|Gi)$
spec.envarray of objectNomax 50
spec.env[].connectionRefobject (nullable)NoWhere an environment variable's value comes from when it is not written in the spec.
spec.env[].connectionRef.keystringYesThe key inside that connection's synced Secret.min 1, max 63; pattern ^[A-Za-z][A-Za-z0-9_]*$
spec.env[].connectionRef.namestringYesName of a Connection in the same namespace.min 1, max 40; pattern ^[a-z0-9][a-z0-9-]*$
spec.env[].namestringYesmin 1, max 64; pattern ^[A-Z_][A-Z0-9_]*$
spec.env[].valuestring (nullable)Nomax 1024
spec.executorobject (nullable)NoThe pod shape of a driver or an executor. Absent fields follow the size class.
spec.executor.coresinteger (nullable)Nomin 1, max 16; format int32
spec.executor.memorystring (nullable)NoFor example 4Gi.pattern ^[1-9][0-9]*(Mi|Gi)$
spec.idleStopMinutesintegerNo60Minutes without a job before the cluster stops by itself. 0 means it never stops.min 0, max 1440; format int32
spec.imagestring (nullable)NoA custom image, pinned by digest so a tag cannot move under the cluster.max 512
spec.maxExecutorsinteger (nullable)Nomin 0, max 50; format int32
spec.ownerobjectYesWho owns a SparkCluster: a group, or as an exception one person.
spec.owner.groupstring (nullable)NoThe Keycloak group whose members start, stop and use the cluster.min 1, max 64; pattern ^[A-Za-z0-9][A-Za-z0-9._-]*$
spec.owner.userstring (nullable)NoOne person's user name. The exception: prefer group.min 1, max 128; pattern ^[A-Za-z0-9][A-Za-z0-9._@-]*$
spec.runtimestringYesThe Spark and Python runtime, for example spark-4.0-py3.12.pattern ^spark-[0-9]+\.[0-9]+-py3\.[0-9]+$
spec.sizestringNosmallA Spark cluster's size class: three shapes an administrator picks instead of every number.small, medium, large
spec.sparkConfobject (map of string)NoSpark settings applied to the driver and the executors.max 100
spec.statestringNoStoppedThe desired state of a SparkCluster. Start and Stop write it; the controller follows it.Stopped, Running
spec.viewersarray of stringNoGroups that may USE the cluster in Nova — see it, connect to it and run work with it — and nothing else. Starting, stopping and changing it stay with owner. Absent means the owner's group only.max 16

Status​

FieldTypeRequiredDefaultDescriptionConstraints
status.driverServiceAccountstring (nullable)Nometadata.name of the ServiceAccount the driver runs as (spark-cluster-driver until #1100, then spark-cluster-driver-<group>).
status.endpointstring (nullable)NoThe Spark Connect endpoint while the cluster runs.
status.lastActivityAtstring (nullable)No
status.messagestring (nullable)No
status.observedGenerationinteger (nullable)Noformat int64
status.phasestringNo""Stopped, Starting, Running, Stopping or Failed.
status.startedAtstring (nullable)No
status.workloadIdentitystring (nullable)NoThe catalog principal the driver's projected token becomes: kubernetes~<ServiceAccount uid> (#538), the same form a ServicePrincipal records. Absent until the operator has applied the ServiceAccount.

Validation rules​

  • set exactly one of owner.group and owner.user
  • pin the image by digest
  • each env var name may appear once in env
  • set exactly one of value and connectionRef