You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve README.md and the release.yml workflow (#13)
* improve README.md and the release.yml workflow
* add a section describing on how to generated the pg_catalog jOOQ sources
* add declarative management section to the README.md
* improve wording
* fix the release.yml workflow
* fix company name in file LICENSE
* lowercase the URLs
* Revert "fix company name in file LICENSE"
This reverts commit 5a639a7.
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.
66
+
The operator, for example, handles:
67
+
68
+
- Changing a `Role`'s flags, password, or comment.
69
+
- Updating the `Role` password if the password in the referenced Secret changes.
70
+
- Updating `Grant`/`DefaultPrivilege` objects or privileges.
71
+
- Changing a `Schema` or `Database` owner.
72
+
73
+
**Deletions**
74
+
75
+
Deleting a Custom Resource triggers the cleanup of the corresponding PostgreSQL object:
76
+
77
+
- For `Grant`, `DefaultPrivilege`, and `Role` resources, the operator revokes privileges or drops the role.
78
+
- For `Database` and `Schema` resources, the behavior depends on the `reclaimPolicy` (defaults to `Retain` to prevent accidental data loss).
79
+
80
+
This ensures that your PostgreSQL cluster configuration always reflects your Kubernetes manifests, simplifying management and automation.
81
+
46
82
### Showcase
47
83
48
84
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.
@@ -212,6 +248,28 @@ make test
212
248
213
249
Afterward, the project can be started in IntelliJ by navigating to `Run` -> `Run '...'`.
214
250
251
+
#### Generating jOOQ sources
252
+
253
+
To update the generated jOOQ sources from schema `pg_catalog`, you need to run the application in dev mode first to start the PostgreSQL Dev Service:
254
+
255
+
```bash
256
+
make run
257
+
258
+
# or
259
+
260
+
./gradlew :operator:quarkusDev
261
+
```
262
+
263
+
Once the application is running (and the database is available on port 5432), run the following command:
264
+
265
+
```bash
266
+
make generate-jooq
267
+
268
+
# or
269
+
270
+
./gradlew :generated:jooqCodegen
271
+
```
272
+
215
273
### Docker Environment
216
274
217
275
See [Docker Environment](docs/docker-environment.md) for setting up a local development environment using Quarkus Dev Services.
0 commit comments