Skip to content

Commit 1f70f10

Browse files
authored
Use mutable instead of immutable in the docs (#40)
* update to Quarkus 3.32.1 and update dependencies to latest versions * validate K8s resource references against the RFC 1123 hostname format Kubernetes uses * refactor SecretRef and ClusterReference to one common ResourceRef type * fix the test by having a own SchemaCustomizer for Kubernetes names * do not short-circuit the PostgreSQLInstanceReadinessCheck check once one instance is down * let the PostgreSQLContextFactory exception bubble up * reformat code * fix compile issue * the namespace should come always first * use mutable instead of immutable in the docs
1 parent 1c65787 commit 1f70f10

6 files changed

Lines changed: 45 additions & 45 deletions

File tree

docs/cluster-connection.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Other Custom Resources (like `Database`, `Role`, `Schema`, `Grant`, `DefaultPriv
77

88
## Spec
99

10-
| Field | Type | Description | Required |
11-
|------------------|---------------------|-----------------------------------------------------------------------|----------|
12-
| `host` | `string` | The hostname of the PostgreSQL instance. | Yes |
13-
| `port` | `integer` | The port of the PostgreSQL instance (1-65535). | Yes |
14-
| `database` | `string` | The database to connect to (usually `postgres` for admin operations). | Yes |
15-
| `adminSecretRef` | `ResourceRef` | Reference to the Kubernetes Secret containing the admin credentials. | Yes |
16-
| `parameters` | `map[string]string` | Additional connection parameters. | No |
10+
| Field | Type | Description | Required | Mutable |
11+
|------------------|---------------------|-----------------------------------------------------------------------|----------|---------|
12+
| `host` | `string` | The hostname of the PostgreSQL instance. | Yes | Yes |
13+
| `port` | `integer` | The port of the PostgreSQL instance (1-65535). | Yes | Yes |
14+
| `database` | `string` | The database to connect to (usually `postgres` for admin operations). | Yes | Yes |
15+
| `adminSecretRef` | `ResourceRef` | Reference to the Kubernetes Secret containing the admin credentials. | Yes | Yes |
16+
| `parameters` | `map[string]string` | Additional connection parameters. | No | Yes |
1717

1818
### ResourceRef (`adminSecretRef`)
1919

docs/database.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ The `Database` Custom Resource Definition (CRD) is responsible for managing Post
44

55
## Spec
66

7-
| Field | Type | Description | Required | Immutable |
8-
|-----------------|---------------|------------------------------------------------------------------------------------------------------|----------|-----------|
9-
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | No |
10-
| `name` | `string` | The name of the database to create. | Yes | Yes |
11-
| `owner` | `string` | The owner of the database. | No | No |
12-
| `reclaimPolicy` | `string` | The policy for reclaiming the database when the CR is deleted. Values: `Retain` (Default), `Delete`. | No | No |
7+
| Field | Type | Description | Required | Mutable |
8+
|-----------------|---------------|------------------------------------------------------------------------------------------------------|----------|---------|
9+
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | Yes |
10+
| `name` | `string` | The name of the database to create. | Yes | No |
11+
| `owner` | `string` | The owner of the database. | No | Yes |
12+
| `reclaimPolicy` | `string` | The policy for reclaiming the database when the CR is deleted. Values: `Retain` (Default), `Delete`. | No | Yes |
1313

1414
### ResourceRef (`clusterRef`)
1515

docs/default-privilege.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ The `DefaultPrivilege` Custom Resource Definition (CRD) manages default privileg
44

55
## Spec
66

7-
| Field | Type | Description | Required | Immutable |
8-
|--------------|-----------------|---------------------------------------------------------------------------------------------------------|-------------|-----------|
9-
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | No |
10-
| `database` | `string` | The database where default privileges apply. | Yes | Yes |
11-
| `role` | `string` | The role to which default privileges are granted. | Yes | Yes |
12-
| `owner` | `string` | The role that owns the objects (the creator). Default privileges apply to objects created by this role. | Yes | Yes |
13-
| `schema` | `string` | The schema where default privileges apply. Required, unless `objectType` is `schema`. | Conditional | Yes |
14-
| `objectType` | `string` | The type of object. | Yes | Yes |
15-
| `privileges` | `array[string]` | List of privileges to grant. | Yes | No |
7+
| Field | Type | Description | Required | Mutable |
8+
|--------------|-----------------|---------------------------------------------------------------------------------------------------------|-------------|---------|
9+
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | Yes |
10+
| `database` | `string` | The database where default privileges apply. | Yes | No |
11+
| `role` | `string` | The role to which default privileges are granted. | Yes | No |
12+
| `owner` | `string` | The role that owns the objects (the creator). Default privileges apply to objects created by this role. | Yes | No |
13+
| `schema` | `string` | The schema where default privileges apply. Required, unless `objectType` is `schema`. | Conditional | No |
14+
| `objectType` | `string` | The type of object. | Yes | No |
15+
| `privileges` | `array[string]` | List of privileges to grant. | Yes | Yes |
1616

1717
### Object Types
1818

docs/grant.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ The `Grant` Custom Resource Definition (CRD) is responsible for managing privile
44

55
## Spec
66

7-
| Field | Type | Description | Required | Immutable |
8-
|--------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------|-------------|-----------|
9-
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | No |
10-
| `database` | `string` | The database containing the objects. | Yes | Yes |
11-
| `role` | `string` | The role to which privileges are granted. | Yes | Yes |
12-
| `schema` | `string` | The schema containing the objects. Required, unless `objectType` is `database`. | Conditional | Yes |
13-
| `objectType` | `string` | The type of object. | Yes | Yes |
14-
| `objects` | `array[string]` | List of object names. If empty, all objects of this `objectType` will be granted. Required, unless `objectType` is `database` or `schema`. | Conditional | No |
15-
| `privileges` | `array[string]` | List of privileges to grant. | Yes | No |
7+
| Field | Type | Description | Required | Mutable |
8+
|--------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------|-------------|---------|
9+
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | Yes |
10+
| `database` | `string` | The database containing the objects. | Yes | No |
11+
| `role` | `string` | The role to which privileges are granted. | Yes | No |
12+
| `schema` | `string` | The schema containing the objects. Required, unless `objectType` is `database`. | Conditional | No |
13+
| `objectType` | `string` | The type of object. | Yes | No |
14+
| `objects` | `array[string]` | List of object names. If empty, all objects of this `objectType` will be granted. Required, unless `objectType` is `database` or `schema`. | Conditional | Yes |
15+
| `privileges` | `array[string]` | List of privileges to grant. | Yes | Yes |
1616

1717
### Object Types
1818

docs/role.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ The `Role` Custom Resource Definition (CRD) manages PostgreSQL roles (users).
44

55
## Spec
66

7-
| Field | Type | Description | Required | Immutable |
8-
|---------------------|---------------|-------------------------------------------------------------------------------------|----------|-----------|
9-
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | No |
10-
| `name` | `string` | The name of the role to create in the database. | Yes | Yes |
11-
| `comment` | `string` | A comment to add to the role. | No | No |
12-
| `passwordSecretRef` | `ResourceRef` | Reference to a secret containing the password for the role to make it a LOGIN role. | No | No |
13-
| `flags` | `RoleFlags` | Flags and attributes for the role. | No | No |
7+
| Field | Type | Description | Required | Mutable |
8+
|---------------------|---------------|-------------------------------------------------------------------------------------|----------|---------|
9+
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | Yes |
10+
| `name` | `string` | The name of the role to create in the database. | Yes | No |
11+
| `comment` | `string` | A comment to add to the role. | No | Yes |
12+
| `passwordSecretRef` | `ResourceRef` | Reference to a secret containing the password for the role to make it a LOGIN role. | No | Yes |
13+
| `flags` | `RoleFlags` | Flags and attributes for the role. | No | Yes |
1414

1515
### ResourceRef (`clusterRef` and `passwordSecretRef`)
1616

docs/schema.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ The `Schema` Custom Resource Definition (CRD) is responsible for managing Postgr
44

55
## Spec
66

7-
| Field | Type | Description | Required | Immutable |
8-
|-----------------|---------------|----------------------------------------------------------------------------------------------------|----------|-----------|
9-
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | No |
10-
| `database` | `string` | The name of the database in which the schema is created. | Yes | Yes |
11-
| `name` | `string` | The name of the schema to create. | Yes | Yes |
12-
| `owner` | `string` | The owner of the schema. | No | No |
13-
| `reclaimPolicy` | `string` | The policy for reclaiming the schema when the CR is deleted. Values: `Retain` (Default), `Delete`. | No | No |
7+
| Field | Type | Description | Required | Mutable |
8+
|-----------------|---------------|----------------------------------------------------------------------------------------------------|----------|---------|
9+
| `clusterRef` | `ResourceRef` | Reference to the `ClusterConnection` to use. | Yes | Yes |
10+
| `database` | `string` | The name of the database in which the schema is created. | Yes | No |
11+
| `name` | `string` | The name of the schema to create. | Yes | No |
12+
| `owner` | `string` | The owner of the schema. | No | Yes |
13+
| `reclaimPolicy` | `string` | The policy for reclaiming the schema when the CR is deleted. Values: `Retain` (Default), `Delete`. | No | Yes |
1414

1515
### ResourceRef (`clusterRef`)
1616

0 commit comments

Comments
 (0)