Skip to main content

Module config

Module config 

Source
Expand description

The configuration sections and their defaults.

Only the keys the first milestones need exist so far; sections grow additively. Unknown keys are an error, so a typo never passes silently.

Structs§

AuthSection
[webserver.auth] and [ui.auth]: who the user is (see archive/PROJECT.md, Authentication: as little as possible in schedr). The name is recorded on commands, never used to allow or deny anything; there are no roles.
BackfillSection
[backfill]: backfills, a run per fire time of a range (schedr runs backfill, decisions 363, 400-404).
ChannelConfig
A server channel ([notifications.channels.<name>], decision 424): its type, and the keys that type takes (the master refuses another type’s).
Config
The whole configuration, after loading and validation.
DagsSection
[dags].
DatabaseSection
[database].
EventsSection
[events]: events posted through the API (POST /api/v1/events, decision 354).
GrpcSection
[grpc]: the link between the master and its workers. Set the same on both: each end reads its own.
HiddenLimits
Fixed limits, like Timings not configuration: only SCHEDR_HIDDEN__* changes them.
Interpreter
An [interpreters] entry: a plain path, or a table with fork server settings.
LogSection
[log].
MappingSection
[mapping].
MasterSection
[master].
NotificationsSection
[notifications]: messages the master sends to channels when runs and tasks end, and those tasks send themselves (decisions 408-429).
OpsSection
[ops].
RetentionSection
[retention]: how long the database keeps what runs left behind (decisions 430-435). The master deletes what is older every hour, in batches; never an unfinished run, nor a DAG’s newest scheduled run, its newest run, or the last that ended success or failed.
ScriptsSection
[scripts].
SecretStorageConfig
[secret_storage.<name>]: one secret storage. Its Debug hides the token.
SecretStorageSection
[secret_storage]: where a worker’s tasks get their secrets (only workers fetch them; see archive/PROJECT.md, Secret storage). Each storage is a table of its own, named by its key ([secret_storage.vault]); standalone always has the db storage besides them.
SensorsSection
[sensors]: wait steps (@sensor, @sensor.poke).
SmtpSection
[notifications.smtp]: the mail server email channels send through (decisions 411, 426).
Timings
The timings that aren’t a user’s to choose, each tuned, tied to others, or what the cluster’s correctness depends on (a wrong value can run tasks twice, or lose a healthy worker): fixed, not configuration. Only SCHEDR_HIDDEN__* changes them, which is what the tests do, to run in seconds; anyone else does so at their own risk.
TlsSection
[tls]: certificates are PEM files (mounted from Kubernetes Secrets), read again when they change.
TriggersSection
[triggers]: event triggers (@trigger, @trigger.poke).
UiDeployment
A deployment schedr ui shows ([[ui.deployments]]).
UiSection
[ui]: the web UI. schedr ui is a role of its own that talks only to webservers’ REST APIs, one per deployment in deployments (one the common case); schedr standalone serves the UI too, next to its API, over its own deployment (deployments is not used there).
VaultAuthConfig
auth = { ... } of a Vault storage.
WatchersSection
[watchers]: the worker’s watcher hosts, which run wait steps.
WebserverSection
[webserver].
WorkerSection
[worker].

Enums§

Age
How long something is kept: a duration ("90d") or "forever".
AuthMode
[webserver.auth] mode, [ui.auth] mode.
ChannelKind
A server channel’s type.
LogFormat
[log] format.
SecretStorageType
A secret storage’s kind.
SmtpTls
How an SMTP connection is secured.
TlsMode
[tls] mode.
VaultAuthMethod
How the agent logs in to Vault.

Constants§

BUILTIN_PYTHON
The executable behind the built-in python interpreter when [interpreters] doesn’t define one.
BUILTIN_PYTHON_ORIGIN
How the built-in python interpreter was chosen when nothing looked further.
DEFAULT_DAG_INTERPRETER
The interpreter name used for parsing DAGs and running Python tasks unless configured.
HIDDEN_PREFIX
The start of the environment variables that set a timing of Timings: SCHEDR_HIDDEN__MASTER__TICK_INTERVAL=100ms. Not configuration, and unsupported: the tests need them, and anyone may experiment at their own risk. The name keeps them from being set by accident; a file can’t set them, and each one set is warned about.

Functions§

config_schema
The JSON Schema of the configuration file: every key with its doc comment, type and default (the configuration reference in the documentation is generated from it).
log_mode
[worker] log_mode as a mode: octal, within 0644, with the owner’s read and write; None for one that isn’t.
url_has_password
Whether a URL has a password: in its user-info part (scheme://user:password@host) or as a query parameter naming one (?password=..., any case, the name percent-decoded; B203).