[Crunch] arvados-docker-cleaner supports configuration from a file
Today, the only way to configure arvados-docker-cleaner is through its command line arguments. It should support configuration through
/etc/arvados/docker-cleaner/config.??? (format and extension TBD) so that we can ship a useful systemd unit file for it.
Existing deployments rely on command line switches for configuration, so the implementation must continue to support those in addition to the new file configuration.
#2 Updated by Brett Smith over 5 years ago
One implementation option: Python's argparse module can read arguments from a file, if you build your ArgumentParser with
fromfile_prefix_chars. If we turned that on, we could ship a systemd service file that runs the command
python3 -m arvados_docker.cleaner @/etc/arvados/docker-cleaner/config.
It's not especially elegant, but it would be the cheapest implementation, since it builds on the configuration we already have, already implements well-defined rules for if an option is specified in both a file and the command line, etc.