Skip to content

Commit ba4d296

Browse files
committed
polish the docs
1 parent 2b133c7 commit ba4d296

4 files changed

Lines changed: 42 additions & 37 deletions

File tree

docs/cluster-connection.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,9 @@ spec:
4848
host: localhost
4949
port: 5432
5050
database: postgres
51+
# Example parameters
52+
parameters:
53+
ApplicationName: "k8s-operator" # Helps identify this connection in Postgres logs
54+
#sslmode: "require" # Enforce SSL encryption
55+
#connectTimeout: "10" # Timeout in seconds for connection attempts
5156
```

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` | `ClusterReference` | 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-
| `objectType` | `string` | The type of object. | Yes | Yes |
14-
| `schema` | `string` | The schema where default privileges apply. Required if `objectType` is `sequence` or `table`. Must NOT be set if `objectType` is `schema`. | Conditional | Yes |
15-
| `privileges` | `array[string]` | List of privileges to grant. | Yes | No |
7+
| Field | Type | Description | Required | Immutable |
8+
|--------------|--------------------|---------------------------------------------------------------------------------------------------------|-------------|-----------|
9+
| `clusterRef` | `ClusterReference` | 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 |
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` | `ClusterReference` | 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-
| `objectType` | `string` | The type of object. | Yes | Yes |
13-
| `objects` | `array[string]` | List of object names. Required if `objectType` is `sequence` or `table`. | Conditional | No |
14-
| `schema` | `string` | The schema containing the objects. Required if `objectType` is `sequence`, `table`, or `schema`. | Conditional | Yes |
15-
| `privileges` | `array[string]` | List of privileges to grant. | Yes | No |
7+
| Field | Type | Description | Required | Immutable |
8+
|--------------|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------|-------------|-----------|
9+
| `clusterRef` | `ClusterReference` | 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 |
1616

1717
### Object Types
1818

docs/role.md

Lines changed: 19 additions & 19 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` | `ClusterReference` | 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-
| `flags` | `RoleFlags` | Flags and attributes for the role. | No | No |
13-
| `passwordSecretRef` | `SecretRef` | Reference to a secret containing the password for the role. | No | No |
7+
| Field | Type | Description | Required | Immutable |
8+
|---------------------|--------------------|-------------------------------------------------------------------------------------|----------|-----------|
9+
| `clusterRef` | `ClusterReference` | 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` | `SecretRef` | 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 |
1414

1515
### ClusterReference
1616

@@ -21,18 +21,18 @@ The `Role` Custom Resource Definition (CRD) manages PostgreSQL roles (users).
2121

2222
### RoleFlags
2323

24-
| Field | Type | Default | Description |
25-
|-------------------|-----------------|---------|------------------------------------------------------------------------|
26-
| `bypassrls` | `boolean` | `false` | Bypass Row Level Security. |
27-
| `connectionLimit` | `integer` | `-1` | Maximum number of concurrent connections. |
28-
| `createdb` | `boolean` | `false` | Ability to create databases. |
29-
| `createrole` | `boolean` | `false` | Ability to create new roles. |
30-
| `inRole` | `array[string]` | `[]` | List of roles this role should be added to. |
31-
| `inherit` | `boolean` | `true` | Whether to inherit privileges from roles it is a member of by default. |
32-
| `replication` | `boolean` | `false` | Ability to initiate replication. |
33-
| `role` | `array[string]` | `[]` | List of roles that should be members of this role. |
34-
| `superuser` | `boolean` | `false` | Superuser status. |
35-
| `validUntil` | `string` | `null` | Date and time until the password is valid (ISO 8601). |
24+
| Field | Type | Default | Description |
25+
|-------------------|-----------------|---------|-------------------------------------------------------------------------|
26+
| `bypassrls` | `boolean` | `false` | Bypass Row Level Security. |
27+
| `connectionLimit` | `integer` | `-1` | Maximum number of concurrent connections. A value of -1 means no limit. |
28+
| `createdb` | `boolean` | `false` | Ability to create databases. |
29+
| `createrole` | `boolean` | `false` | Ability to create new roles. |
30+
| `inRole` | `array[string]` | `[]` | List of roles this role should be added to. |
31+
| `inherit` | `boolean` | `true` | Whether to inherit privileges from roles it is a member of by default. |
32+
| `replication` | `boolean` | `false` | Ability to initiate replication. |
33+
| `role` | `array[string]` | `[]` | List of roles that should be members of this role. |
34+
| `superuser` | `boolean` | `false` | Superuser status. |
35+
| `validUntil` | `string` | `null` | Date and time until the password is valid (ISO 8601). |
3636

3737
### SecretRef
3838

0 commit comments

Comments
 (0)