actor.ActorEnvironment#

class union.actor.ActorEnvironment(name, container_image=None, replica_count=1, ttl_seconds=None, environment=None, requests=None, limits=None, accelerator=None, secret_requests=None, pod_template=None)#

ActorEnvironment class.

Parameters:
  • name (str) – The name of the actor. This is used in conjunction with the project, domain, and version to uniquely identify the actor.

  • container_image (str | ImageSpec | None) – The container image to use for the task. Set to default image if none provided.

  • replica_count (int) – The number of workers to provision that are able to accept tasks.

  • ttl_seconds (int | None) – How long to keep the Actor alive while no tasks are being run. If not provided the default configuration value of 90s will be used.

  • environment (Dict[str, str] | None) – Environment variables as key, value pairs in a Python dictionary.

  • requests (Resources | None) – Compute resource requests per task.

  • limits (Resources | None) – Compute resource limits.

  • accelerator (BaseAccelerator | None) – The accelerator device to use for the task.

  • secret_requests (List[Secret] | None) – Keys (ideally descriptive) that can identify the secrets supplied at runtime.

  • pod_template (PodTemplate | None)