Commit 6c843233 authored by Łukasz Nowak's avatar Łukasz Nowak

software/caddy-frontend: Fix kedifa reloading

Because of escaping of slapos.cookbook:wrapper kedifa is never reloaded, so
use instead jinja2 with template_wrapper for it.

Also adapt to kill from dash (-HUP).
parent 597c8b52
Pipeline #11610 failed with stage
...@@ -114,7 +114,7 @@ md5sum = 38792c2dceae38ab411592ec36fff6a8 ...@@ -114,7 +114,7 @@ md5sum = 38792c2dceae38ab411592ec36fff6a8
[template-kedifa] [template-kedifa]
filename = instance-kedifa.cfg.in filename = instance-kedifa.cfg.in
md5sum = f77744e52f9d028c39f99cfbf31eadaf md5sum = c784ac325fbd383277bf1ae551abcfd0
[template-backend-haproxy-rsyslogd-conf] [template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in _update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
......
...@@ -105,7 +105,7 @@ stop-on-error = True ...@@ -105,7 +105,7 @@ stop-on-error = True
ca_path='${kedifa-config:ca-certificate}', ca_path='${kedifa-config:ca-certificate}',
crl_path='${kedifa-config:crl}', crl_path='${kedifa-config:crl}',
key_path='${kedifa-csr:key}', key_path='${kedifa-csr:key}',
on_renew='${kedifa-reloader:wrapper-path}', on_renew='${kedifa-reloader:rendered}',
template_csr='${kedifa-csr:template-csr}' template_csr='${kedifa-csr:template-csr}'
)}} )}}
...@@ -213,9 +213,14 @@ pidfile = ${directory:run}/kedifa.pid ...@@ -213,9 +213,14 @@ pidfile = ${directory:run}/kedifa.pid
logfile = ${directory:log}/kedifa.log logfile = ${directory:log}/kedifa.log
[kedifa-reloader] [kedifa-reloader]
recipe = slapos.cookbook:wrapper <= jinja2-template-base
command-line = kill -SIGHUP `cat ${kedifa-config:pidfile}` template = {{ parameter_dict['template_wrapper'] }}
wrapper-path = ${directory:etc-run}/kedifa-reloader rendered = ${directory:etc-run}/kedifa-reloader
command =
kill -HUP `cat ${kedifa-config:pidfile}`
mode = 0700
extra-context =
key content :command
[promise-kedifa-http-reply] [promise-kedifa-http-reply]
<= monitor-promise-base <= monitor-promise-base
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment