|
1 | 1 | # enable-template |
2 | 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") }} |
| 3 | +# Custom server config for the tls-full sample. Based on the default |
| 4 | +# development-cass-es.yaml embedded in the server binary, with the following |
| 5 | +# changes: |
| 6 | +# |
| 7 | +# - Uses # enable-template directive with sprig env() for environment variable |
| 8 | +# substitution (the default config uses hardcoded values) |
| 9 | +# - Adds global.tls block with internode mTLS and per-namespace frontend |
| 10 | +# hostOverrides (the reason this custom config exists) |
| 11 | +# - Uses bindOnIP instead of bindOnLocalHost so services are reachable |
| 12 | +# across containers |
| 13 | +# - Omits pprof, metrics, archival, dcRedirectionPolicy, and |
| 14 | +# dynamicConfigClient (not relevant to this sample; the server uses |
| 15 | +# a noop dynamic config client when none is configured) |
6 | 16 | # |
7 | 17 | # To preview the rendered config, run: |
8 | 18 | # temporal-server --config-file /path/to/this/file render-config |
@@ -33,6 +43,10 @@ global: |
33 | 43 | membership: |
34 | 44 | maxJoinDuration: 30s |
35 | 45 | broadcastAddress: {{ default "" (env "TEMPORAL_BROADCAST_ADDRESS") }} |
| 46 | + # TLS config -- this is the only section not present in the default config. |
| 47 | + # Internode mTLS secures cluster-internal traffic. Frontend hostOverrides |
| 48 | + # map SNI hostnames to per-namespace cert/CA pairs, allowing each namespace |
| 49 | + # to authenticate with its own client certificate. |
36 | 50 | tls: |
37 | 51 | internode: |
38 | 52 | server: |
@@ -65,13 +79,42 @@ global: |
65 | 79 | requireClientAuth: true |
66 | 80 | clientCaFiles: |
67 | 81 | - /certs/client/ca/client-intermediate-ca-development.pem |
| 82 | + # The system worker must connect to frontend over TLS. There are two |
| 83 | + # approaches: |
| 84 | + # |
| 85 | + # 1. systemWorker (used here) -- give the worker a client cert that |
| 86 | + # frontend trusts. Simpler, no extra service needed. |
| 87 | + # |
| 88 | + # 2. internal-frontend -- run a separate frontend that uses internode |
| 89 | + # TLS (no client auth required). To use this instead, remove |
| 90 | + # systemWorker, uncomment internal-frontend under services, and add |
| 91 | + # "internal-frontend" to TEMPORAL_SERVICES in docker-compose.yml. |
| 92 | + # |
| 93 | + # See the PublicClient comment for guidance on when to use each: |
| 94 | + # https://github.com/temporalio/temporal/blob/8e6e905428f0ec5257402cb003ead5f4924cdc95/common/config/config.go#L548-L564 |
| 95 | + systemWorker: |
| 96 | + certFile: /certs/cluster/internode/cluster-internode.pem |
| 97 | + keyFile: /certs/cluster/internode/cluster-internode.key |
| 98 | + client: |
| 99 | + serverName: internode.cluster-x.contoso.com |
| 100 | + rootCaFiles: |
| 101 | + - /certs/cluster/ca/server-intermediate-ca.pem |
68 | 102 |
|
69 | 103 | services: |
70 | 104 | frontend: |
71 | 105 | rpc: |
72 | 106 | grpcPort: 7233 |
73 | 107 | membershipPort: 6933 |
| 108 | + # bindOnIP instead of bindOnLocalHost so services bind to the |
| 109 | + # container's network interface rather than loopback only. |
74 | 110 | bindOnIP: {{ default "127.0.0.1" (env "BIND_ON_IP") }} |
| 111 | + # Alternative to systemWorker: uncomment to run a dedicated internal |
| 112 | + # frontend that the system worker connects to via internode TLS. |
| 113 | + # internal-frontend: |
| 114 | + # rpc: |
| 115 | + # grpcPort: 7236 |
| 116 | + # membershipPort: 6936 |
| 117 | + # bindOnIP: {{ default "127.0.0.1" (env "BIND_ON_IP") }} |
75 | 118 | matching: |
76 | 119 | rpc: |
77 | 120 | grpcPort: 7235 |
@@ -99,7 +142,3 @@ clusterMetadata: |
99 | 142 | initialFailoverVersion: 1 |
100 | 143 | rpcName: "frontend" |
101 | 144 | rpcAddress: "127.0.0.1:7233" |
102 | | - |
103 | | -dynamicConfigClient: |
104 | | - filepath: {{ default "/etc/temporal/config/dynamicconfig" (env "DYNAMIC_CONFIG_FILE_PATH") }} |
105 | | - pollInterval: "60s" |
|
0 commit comments