stilt.execution.KubernetesExecutor#

class stilt.execution.KubernetesExecutor(image: 'str', namespace: 'str' = 'default', n_workers: 'int' = 1, db_secret: 'str' = 'pystilt-db', **pod_spec: 'Any') → 'None'[source]#

Run pull workers as a Kubernetes Job.

The workers take receptors from the PostgreSQL work queue until it is empty, so the receptors must be registered first.

Parameters

imagestr

Container image with PYSTILT installed.

namespacestr, default “default”

Kubernetes namespace of the Job.

n_workersint, default 1

Number of worker pods.

db_secretstr, default “pystilt-db”

Kubernetes secret holding the queue’s PYSTILT_DB_URL.

**pod_spec

Extra fields for the pod spec.

Methods#

from_config(config)

Return an executor for a config's execution settings, which must set image.

start(pending, *, project[, compute_root, ...])

Create the worker Job and return its handle.

Attributes#

dispatch

n_workers

Number of worker pods.