Skip to content

Commit 80a3d8d

Browse files
committed
Update readme with additional context around custom password policies for PostgresUser
1 parent e284739 commit 80a3d8d

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ Set environment variables in [`config/manager/operator.yaml`](config/manager/ope
7272
| `POSTGRES_INSTANCE` | Operator identity for multi-instance deployments. | (empty) |
7373
| `KEEP_SECRET_NAME` | Use user-provided secret names instead of auto-generated ones. | disabled |
7474

75+
> **Note:**
76+
> If enabling `KEEP_SECRET_NAME`, ensure there are no secret name conflicts in your namespace to avoid reconcile loops.
77+
7578
### Password Policy Configuration
7679

7780
| Name | Description | Default |
@@ -84,9 +87,6 @@ Set environment variables in [`config/manager/operator.yaml`](config/manager/ope
8487
| `POSTGRES_DEFAULT_PASSWORD_EXCLUDE_CHARS` | Characters to exclude from the generated password. | (empty) |
8588
| `POSTGRES_DEFAULT_PASSWORD_ENSURE_FIRST_LETTER` | Ensure the password starts with a letter. | `false` |
8689

87-
> **Note:**
88-
> If enabling `KEEP_SECRET_NAME`, ensure there are no secret name conflicts in your namespace to avoid reconcile loops.
89-
9090
## Installation
9191

9292
### Install Using Helm (Recommended)
@@ -194,6 +194,14 @@ spec:
194194
foo: "bar" # Labels to be propagated to the secrets metadata section (optional)
195195
secretTemplate: # Output secrets can be customized using standard Go templates
196196
PQ_URL: "host={{.Host}} user={{.Role}} password={{.Password}} dbname={{.Database}}"
197+
passwordPolicy: # Specific password policy for this user (optional)
198+
length: 20
199+
minLower: 1
200+
minUpper: 1
201+
minNumeric: 1
202+
minSpecial: 1
203+
excludeChars: "@"
204+
ensureFirstLetter: true
197205
```
198206

199207
This creates a user role `username-<hash>` and grants role `test-db-group`, `test-db-writer` or `test-db-reader` depending on `privileges` property. Its credentials are put in secret `my-secret-my-db-user` (unless `KEEP_SECRET_NAME` is enabled).

0 commit comments

Comments
 (0)