From aa336670d9de901f6757758a4ecc07d5d1a7fa06 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 11 Apr 2024 23:21:45 +0200 Subject: [PATCH] Take default redis resources alloc from .redis --- templates/task.redis | 17 ++--------------- variables.yml | 7 +++++++ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/templates/task.redis b/templates/task.redis index 258bd3c..c54e662 100644 --- a/templates/task.redis +++ b/templates/task.redis @@ -16,6 +16,7 @@ image = "[[ .docker.base_images.valkey.image ]]" readonly_rootfs = true force_pull = true + pids_limit = 100 args = ["/local/valkey.conf"] } @@ -30,20 +31,6 @@ _EOT destination = "local/valkey.conf" } - resources { -[[- if and (has . "resources") (has .resources "cpu") ]] - cpu = [[ .resources.cpu ]] -[[- else ]] - cpu = 10 -[[- end ]] -[[- if and (has . "resources") (has .resources "memory") ]] - memory = [[ .resources.memory ]] -[[- else ]] - memory = 20 -[[- end ]] -[[- if and (has . "resources") (has .resources "memory_max") ]] - memory_max = [[ .resources.memory_max ]] -[[- end ]] - } +[[ template "common/resources" .redis ]] } diff --git a/variables.yml b/variables.yml index ce6686d..d26759c 100644 --- a/variables.yml +++ b/variables.yml @@ -207,6 +207,13 @@ prometheus: # Path of the vault PKI used for monitoring vault_pki: '[[ .vault.root ]]pki/monitoring' +# Default redis (or valkey) settings +redis: + image: '[[ .docker.base_images.valkey.image ]]' + resources: + cpu: 10 + memory: 20 + docker: # Your repo where locally built images will be pushed repo: danielberteaud/