From a96bda45acda072ee61de9cec8be2f0892455e3c Mon Sep 17 00:00:00 2001 From: Scott Clarke Date: Wed, 18 Sep 2024 16:56:20 +0100 Subject: [PATCH] Add `casd_reserved` var and change default args `casd_reserved` allows specifying a value for the `--reserved` flag. To accomodate using this the default arguments passed to buildbox-casd have changed to avoid always setting the `--quota-high` flag --- README.md | 1 + defaults/main.yml | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 640666e..6d2746f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ A [default configuration](defaults/main.yml) is provided in this role. It establ - `casd_published_ports`: a list of docker port specifications to be published. This does not affect whether the port on which buildbox-casd is listening is exposed. - `casd_bind_address`: the address the service listens to inside the container - `casd_quota_high`: the maximum local cache size +- `casd_reserved`: Reserved disk space - `casd_cache_mnt`: the path to bindmount the cache to in the container - `casd_cmd`: the entrypoint of the container - `casd_bind_path`: path to a UNIX socket to serve on. If set, `casd_bind_address` and `casd_port` are ignored entirely and the service is not exposed. diff --git a/defaults/main.yml b/defaults/main.yml index e94d2ae..a1fc629 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -31,11 +31,14 @@ casd_metrics_args: >- casd_bind_address: "0.0.0.0" casd_bind_path: "" casd_bind: "{{ 'unix:' ~ casd_bind_path if casd_bind_path else casd_bind_address ~ ':' ~ casd_port }}" -casd_quota_high: "200G" +casd_quota_high: "" +casd_reserved: "" casd_cache_mnt: "/srv" casd_certs_mnt: "/certs" casd_cmd: >- - --verbose --bind {{ casd_bind }} --quota-high {{ casd_quota_high }} + --verbose --bind {{ casd_bind }} + {% if casd_quota_high %}--quota-high {{ casd_quota_high }}{% endif %} + {% if casd_reserved %}--reserved {{ casd_reserved }}{% endif %} {{ casd_metrics_args }} {{ casd_proxy_cas_args }} {{ casd_proxy_ac_args }} {{ casd_proxy_asset_args }} {{ casd_proxy_execution_args }} {{ casd_cache_mnt }} casd_default_mounts: