Config#

pydantic settings nublado.purger.config.Config#

Configuration for the purger.

Parameters:
Fields:
field add_timestamp: Annotated[bool] = False#
field alert_hook: Annotated[Optional[SecretStr]] = None#

An https URL, which should be considered secret. If not set or set to None, this feature will be disabled.

field debug: Annotated[bool] = False#

If True, then log level will be set to debug and will non-structured, human-readable output.

field dry_run: Annotated[bool] = False#
field future_duration: Annotated[Optional[TypeAliasType]] = None#
field log_level: Annotated[LogLevel] = LogLevel.INFO#
field log_profile: Annotated[Profile] = Profile.production#
field policy_file: Annotated[Path] = PosixPath('/etc/purger/policy.yaml')#
configure_logging()#

Configure logging based on the purger configuration.

Return type:

None

classmethod from_file(path)#

Construct the configuration from a YAML file.

Parameters:

path (Path) – Path to the configuration file in YAML.

Returns:

The corresponding configuration.

Return type:

nublado.purger.config.Config