Skip to content

Commit 5a99926

Browse files
authored
Add a note to README about how externalSecret should be configured. (#885)
* Add a note to README about how externalSecret should be configured. * De-emphasise creating your own secret as we're discussing existing secrets.
1 parent dd33877 commit 5a99926

1 file changed

Lines changed: 50 additions & 3 deletions

File tree

README.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,61 @@ server:
9797
- `manageSchema`: If `true`, the chart will run schema setup/upgrade jobs (default: `true`)
9898
- `existingSecret`: Reference to an existing Kubernetes secret containing credentials (e.g., `temporal-db-secret`). If not set, the chart will create a new secret.
9999
- `secretKey`: Key name within the secret to read the password from (default: `password`)
100-
- **Password handling**: Passwords are always stored in Kubernetes secrets and read from environment variables - they are never written to ConfigMaps or other manifests, even if provided as plaintext in your values file.
101-
- If `existingSecret` is not set, the chart creates a new secret using the `password` value from your values file
102-
- If `existingSecret` is set, the chart uses that existing secret (the `password` field in values is ignored)
100+
- **Password handling**: Passwords are always stored in Kubernetes secrets and read from environment variablesthey are never written to ConfigMaps or other manifests, even if you supply a plaintext `password` in values for bootstrap only.
101+
- If `existingSecret` is set, the chart uses that secret and ignores any `password` field in values for that datastore
102+
- If `existingSecret` is not set, the chart creates a secret from the `password` value in values
103103
- The server configuration always reads passwords from environment variables that reference these secrets
104104
- All other fields pass through directly to the Temporal server config
105105

106106
See the example values files in the `values/` directory for complete examples.
107107

108+
#### Using an existing Kubernetes secret
109+
110+
For production and GitOps, manage database credentials in a Kubernetes `Secret` that you (or a controller such as External Secrets) create and own outside this chart. Point each datastore at that object with `existingSecret` (the secret name) and `secretKey` (the key inside the secret that holds the password; default `password`).
111+
112+
The secret must exist in the same namespace as the release before the chart’s jobs or pods need it. A typical manifest looks like this (`stringData` is fine if you prefer not to base64-encode by hand):
113+
114+
```yaml
115+
apiVersion: v1
116+
kind: Secret
117+
metadata:
118+
name: temporal-db-secret
119+
type: Opaque
120+
data:
121+
password: <base64-encoded-password>
122+
```
123+
124+
Reference it from your values (here both stores share one secret; use separate secrets if you split credentials):
125+
126+
```yaml
127+
server:
128+
config:
129+
persistence:
130+
datastores:
131+
default:
132+
sql:
133+
pluginName: postgres12_pgx
134+
driverName: postgres12_pgx
135+
databaseName: temporal
136+
connectAddr: "postgres.example.com:5432"
137+
connectProtocol: tcp
138+
user: temporal_user
139+
existingSecret: temporal-db-secret
140+
secretKey: password
141+
visibility:
142+
sql:
143+
pluginName: postgres12_pgx
144+
driverName: postgres12_pgx
145+
databaseName: temporal_visibility
146+
connectAddr: "postgres.example.com:5432"
147+
connectProtocol: tcp
148+
user: temporal_user
149+
existingSecret: temporal-db-secret
150+
secretKey: password
151+
```
152+
153+
For a disposable local cluster only, you can seed a minimal secret before `helm install` with `kubectl create secret generic temporal-db-secret --from-literal=password=your_db_password`. Prefer your standard secret workflow everywhere else.
154+
108155
### Install with sidecar containers
109156

110157
You may need to provide your own sidecar containers (e.g., for database proxies).

0 commit comments

Comments
 (0)