Skip to main content
Custom provisioners are deployment-trusted executables. Blue invokes the configured absolute path directly, with no arguments and the Control API environment. The file must be a regular executable, and its lowercase SHA-256 pin is verified at startup. A shebang selects the interpreter; that interpreter and every imported dependency must exist in the Control API image.

Configuration

Helm can copy the executable from a separately pinned artifact image:
The artifact image must contain /executable/provisioner. The init container verifies it, installs it at /var/run/blue/provisioner/provisioner with mode 0555, and mounts it read-only.

Implement the executable

The executable reads one request from stdin and writes one response to stdout. Blue passes no command-line arguments.
provisioner.py
This policy requires an existing LiteLLM user with the same email as the Blue identity. Set LITELLM_MODELS to a comma-separated model allowlist, or leave it empty to let LiteLLM apply its defaults. Extend key_policy with team_id, budgets, rate limits, or duration when your organization requires them.
Never print credentials, request stdin, or successful response JSON to logs. Stdout belongs exclusively to the protocol. Keep stderr diagnostics free of identities, credentials, and upstream response bodies.
Exercise the LiteLLM HTTP flow against a non-production gateway before building the artifact. The ensure request below calls /user/list and /key/generate; use the returned external_id in a revoke request to call /key/delete.

JSON protocol

For ensure, stdin contains exactly one request:
reason is missing, configuration_changed, reconciliation_due, or credential_invalidated. When present, previous contains external_id, alias, and metadata. Return credential_invalid when a previous key is confirmed deleted or blocked; Blue clears the stale encrypted credential and performs at most one bounded replacement attempt. Revoke uses operation revoke and a request containing identity and external_id. A successful ensure returns:
credential may be null only when retaining the existing encrypted credential. expires_at is optional and, when supplied, must be RFC 3339. A successful revoke result is {"revoked":true}. Errors use a non-zero exit and this envelope:
Codes are invalid_config, account_missing, conflict, credential_invalid, unavailable, and rejected. Exit zero is valid only with a success envelope; every non-zero status (including shell exit -1, observed as 255 on Unix) is valid only with an error envelope. Empty, malformed, multiple, oversized, or protocol-mismatched stdout is treated as an unavailable host error. Stdout is reserved for the protocol. Blue never logs request stdin or successful stdout because they can contain credentials. Bounded stderr is available only as sanitized server diagnostics and is never returned to API or CLI clients. Timed-out children are terminated and reaped. Blue serializes lifecycle work per user. Effective provisioner concurrency is min(max_concurrency, max(database_max_connections / 2, 1)), with max_concurrency defaulting to 8; gateway provisioning refuses to start when the control database pool has fewer than two connections. Invalid-key replacement is attempted once per trigger, uses persisted exponential cooldown, and stops automatic retries after five consecutive failures. Failed ensure messages are persisted in provisioning_error and returned through existing API and CLI error responses. No partial result is stored. Reconciliation remains retryable, so the next governed launch or personalized configuration fetch runs ensure again before inference.

Build and verify the artifact

The artifact image supplies the pinned file to Helm; the executable runs inside the Control API container. For this Python example, install Python 3 in your deployed Control API image. Any imported third-party packages must be installed there as well. This example uses only Python’s standard library.
For example, extend the Control API runtime image separately:
Pin the file digest in both gateway.provisioner.executable_sha256 and blue.provisionerExecutable.executableSha256. Pin the OCI digest under blue.provisionerExecutable.image.digest.

Retry and troubleshooting behavior