Skip to content

Configuration pinexq.toml

The pinexq.toml file is used to configure your Pinexq project. The minimal configuration is:

pinexq.toml
[project]
name = "my-project"
pinexq_endpoint = "jobs.api.dev.pinexq.net"
entrypoint = "main.py"
[deployment]
cpu = "1"
memory = "4Gi"
disk = "10Gi"
max_replicas = 4

Extended configuration example:

pinexq.toml
[project]
name = "my-project"
pinexq_endpoint = "jobs.api.dev.pinexq.net"
entrypoint = "main.py"
[deployment]
cpu = "1"
memory = "4Gi"
disk = "10Gi"
max_replicas = 4
[function.hello_world]
deployment = { cpu = "4", memory = "16Gi", disk = "50Gi", max_replicas = 1 }
defaults = { greeting = "Hello PineXQ", interval = 60 }
  • name: The project’s identifier/name. Used to label the project in tooling and platform UI/metadata. Not relevant for the deployment.
  • pinexq_endpoint: The PinexQ API endpoint (host/address) the project should connect to for job-related operations.
  • entrypoint: The startup file that contains the __main__ function and should be executed when running the ProCon.

The resources each worker reserves, stated by all three of cpu, memory and disk, or by the deprecated resource_preset, not both. Without either, the Medium preset is used. See Resources for how a worker uses them.

  • cpu: The CPU as a Kubernetes quantity in cores, e.g. "500m", "1.5" or "2". Must be a whole number of millicores.
  • memory: The memory as a Kubernetes quantity, e.g. "512Mi" or "16Gi". Must be a whole number of MiB.
  • disk: The disk for the worker’s local files as a Kubernetes quantity, e.g. "10Gi". Must be a whole number of GiB.
  • resource_preset (deprecated, will be removed in a future release): A named sizing preset (XSmall, Small, Medium, Large, XLarge, XXLarge) that stands for fixed resources. See Resource presets for the values; use cpu, memory and disk instead.
  • max_replicas: The maximum number of replicas/instances the deployment may scale out to. Higher values allow more parallelism and throughput but increase resource usage and cost.

Function-specific configuration that overrides the project-level configuration.

  • deployment (optional): replaces the project-level [deployment] as a whole for this function.
    • cpu, memory and disk, or the deprecated resource_preset: The resources for the function, as in [deployment].
    • max_replicas: The maximum number of replicas/instances the function may scale out to.
  • defaults: Default function values that should be configured for the function.
  • TOML files do not have a None value; instead, create defaults and omit those values, e.g. defaults={}
  • If an inline table becomes too large, it may be necessary to use a normal table. For example:
pinexq.toml
[project]
name = "my-project"
pinexq_endpoint = "jobs.api.dev.pinexq.net"
entrypoint = "main.py"
[deployment]
cpu = "1"
memory = "4Gi"
disk = "10Gi"
max_replicas = 4
[function.hello_world.defaults]
greeting = "Hello PineXQ"
interval = 60
encoding = "utf8"