Skip to content

Commit 7a08606

Browse files
committed
docs: document enable-template directive and render-config command
1 parent 3d5d65f commit 7a08606

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

tls/tls-full/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,14 @@ To actually enforce namespace access, you'll have to build the server with a cus
5555
You can look in [tlsClaimMapper.go](./tlsClaimMapper.go) for an example that will work with the certs in this sample,
5656
and in [the authorizer sample](../../extensibility/authorizer/) for more instructions on how to build a custom server.
5757

58+
### Custom config template
59+
60+
This sample uses a custom `config_template.yaml` to configure per-namespace TLS host overrides. The file is a Go template rendered by the Temporal server using [sprig](https://masterminds.github.io/sprig/) functions.
61+
62+
To enable template rendering, the file must contain `# enable-template` in the first 1KB. It is loaded via the `TEMPORAL_SERVER_CONFIG_FILE_PATH` environment variable.
63+
64+
To preview the rendered config inside the container:
65+
66+
```bash
67+
docker compose exec temporal temporal-server --config-file /etc/temporal/config/config_template.yaml render-config
68+
```

tls/tls-full/config_template.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# enable-template
2+
#
3+
# This comment enables Go template rendering with sprig functions when loaded
4+
# via TEMPORAL_SERVER_CONFIG_FILE_PATH. Environment variables are accessed with
5+
# the sprig env function: {{ default "fallback" (env "VAR_NAME") }}
6+
#
7+
# To preview the rendered config, run:
8+
# temporal-server --config-file /path/to/this/file render-config
9+
#
210
log:
311
stdout: true
412
level: {{ default "info" (env "LOG_LEVEL") }}

0 commit comments

Comments
 (0)