Skip to content

Commit 24925b2

Browse files
committed
add declarative management section to the README.md
1 parent 893d716 commit 24925b2

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,29 @@ Further documentation of each Custom Resource can be found here:
5555
- [Grant](docs/grant.md) - Manage privileges.
5656
- [DefaultPrivilege](docs/default-privilege.md) - Manage default privileges.
5757

58+
### Declarative Management
59+
60+
The Operator leverages the power of Kubernetes Custom Resource Definitions (CRDs) to manage PostgreSQL resources declaratively.
61+
This means the Operator continuously reconciles the state of the cluster to match your desired state defined in the CRs.
62+
63+
**Updates**
64+
65+
If you modify a mutable field in a Custom Resource, the Operator automatically applies these changes to the PostgreSQL cluster. This includes:
66+
67+
- Changing a `Role` flags, password or comment.
68+
- Updating `Grant` objects or privileges.
69+
- Changing a `Schema` or `Database` owner.
70+
- Updating the `Role` password if the password in the referenced Secret changes.
71+
72+
**Deletions**
73+
74+
Deleting a Custom Resource triggers the cleanup of the corresponding PostgreSQL object:
75+
76+
- For `Grant`, `DefaultPrivilege`, and `Role` resources, the operator revokes privileges or drops the role.
77+
- For `Database` and `Schema` resources, the behavior depends on the `reclaimPolicy` (defaulting to `Retain` to prevent accidental data loss).
78+
79+
This ensures that your PostgreSQL cluster configuration always reflects your Kubernetes manifests, simplifying management and automation.
80+
5881
### Showcase
5982

6083
The following example shows how to set up a connection to a PostgreSQL cluster, create a database and schema, a login role (user), and configure permissions.

0 commit comments

Comments
 (0)