Skip to main content

Module source

Module source 

Source
Expand description

Where signal.yaml comes from, and how it is fetched and cached.

$SIGNAL_CONFIG can name a local path or a remote object:

  • /etc/opssignal/signal.yaml (or any path): read from disk
  • https://config.example.com/signal.yaml: plain GET
  • s3://bucket/key: needs the aws cargo feature
  • gs://bucket/object: needs the gcp cargo feature
  • az://container/blob: needs the azure cargo feature; the storage account comes from $AZURE_STORAGE_ACCOUNT_NAME
  • appconfig://application/environment/profile: AWS AppConfig, needs the aws cargo feature
  • azappconfig://store/key?label=prod: Azure App Configuration, needs the azure cargo feature
  • dynamodb://table/id: an Amazon DynamoDB item, needs aws
  • firestore://project/collection/document: a Firestore document, needs gcp
  • cosmos://account/database/container/id: an Azure Cosmos DB item, needs azure

Cloud fetches use each platform’s standard credential chain (IAM role / IRSA / env keys on AWS; workload identity / ADC / service account on GCP; workload identity / managed identity / service principal / SAS on Azure), so OpsSignal adds no keys of its own.

A remote config is cached on local disk after every successful fetch, as the raw text before ${VAR} interpolation, so no secret is ever written to the cache. If the source can’t be reached or returns a broken file, the last good cached copy is used instead: a bucket outage must never be the reason an alert goes missing.

$SIGNAL_CONFIG may also list several files, comma separated, and any file may extends: others; see Config::from_layers for how they merge. Each remote file in the chain is cached on its own.

Structs§

LoadOptions
How a client loads and refreshes its config.

Enums§

ConfigSource

Constants§

CACHE_DIR_ENV_VAR
CLOUD_SCHEMES
The URL schemes each cloud’s add-on serves: config sources, then the secret stores of ${store:...} placeholders (see secrets).
DEFAULT_REFRESH
REFRESH_ENV_VAR

Traits§

ExternalFetcher
Reads one URL scheme for a build that was compiled without it.

Functions§

fetch_blocking
Fetches the raw text at url on a throwaway runtime, with errors in the form an ExternalFetcher returns them. This is what add-on packages call to serve a request. url is a config source or a secret reference without its #field (aws-sm:prod/slack).
register_cloud_fetcher
Registers fetcher for every scheme of cloud (aws, gcp or azure; see CLOUD_SCHEMES). This is what an add-on package does.
register_fetcher
Registers fetcher for one URL scheme (such as s3), replacing any earlier one. A scheme compiled into this build ignores it.