support for docker secrets in template

This commit is contained in:
blib 2023-05-28 22:47:28 +03:00
parent f187592147
commit 0b2c4416c2
2 changed files with 24 additions and 2 deletions

View file

@ -4,6 +4,8 @@
In additional to the [built-in Go template functions and features][tt], `webhook` provides a `getenv` template function for inserting environment variables into a templated configuration file.
`secret` template function provides access to docker secrets. `secret secret_name` will insert content of `/run/secrets/secret_name` file into a templated configuration file.
## Example Usage
In the example JSON template file below (YAML is also supported), the `payload-hmac-sha1` matching rule looks up the HMAC secret from the environment using the `getenv` template function.