Skip to content

Commit

Permalink
feat: postgres interface (#42)
Browse files Browse the repository at this point in the history
Add an interface to interact with PostgreSQL configuration parameters

Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
  • Loading branch information
leonardoce and armru authored Aug 30, 2024
1 parent f231bc4 commit b8e17e4
Show file tree
Hide file tree
Showing 5 changed files with 983 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
AdditionalInformationEntry
alphanumerics
api
BackupCapabilitiesRequest
BackupCapabilitiesResult
BackupCapability
BackupRequest
BackupResult
ByteString
CloudNativePG
ConfigsEntry
DEREGISTER
Deregister
DeregisterRequest
DeregisterResponse
EnrichConfiguration
EnrichConfigurationRequest
EnrichConfigurationResult
FalseClass
GetCapabilities
GetPluginCapabilities
Expand All @@ -21,9 +23,6 @@ GetPluginMetadata
GetPluginMetadataRequest
GetPluginMetadataResponse
JSONPatch
kube
kubernetes
lifecycle
LifecycleHook
ManifestEntry
MetadataEntry
Expand All @@ -47,30 +46,29 @@ OperatorValidateClusterCreateRequest
OperatorValidateClusterCreateResult
ParametersEntry
PluginCapability
PostgresCapabilitiesRequest
PostgresCapabilitiesResult
PostgresCapability
Pre
ProbeRequest
ProbeResponse
RPC
RPC
RPCs
RPCs
ReconcilerHooks
ReconcilerHooksCapabilitiesRequest
ReconcilerHooksCapabilitiesResult
ReconcilerHooksCapability
ReconcilerHooksRequest
ReconcilerHooksResult
reconcilers
requeue
rfc
RPC
rpc
RPCs
ScheduledBackup
SetStatusInCluster
SetStatusInClusterRequest
SetStatusInClusterResponse
SetFirstRequired
SetFirstRequiredRequest
SetFirstRequiredResult
SetStatusInCluster
SetStatusInClusterRequest
SetStatusInClusterResponse
TrueClass
ValidateClusterChange
ValidateClusterCreate
Expand All @@ -87,11 +85,14 @@ WALService
WALStatusRequest
WALStatusResult
alphanumerics
alphanumerics
api
bignum
bool
boolean
cncf
cnpg
configs
csi
customizable
customizations
Expand All @@ -102,18 +103,25 @@ html
https
ietf
json
kube
kubernetes
kubernetes
lifecycle
lifecycle
lsn
pluggable
pluginName
postgres
proto
reconciler
reconcilers
reconcilers
requeue
requeue
rfc
rfc
rpc
rpc
sfixed
sint
slonik
Expand Down
170 changes: 170 additions & 0 deletions docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@

- [OperatorLifecycle](#cnpgi-operator_lifecycle-v1-OperatorLifecycle)

- [postgres.proto](#postgres-proto)
- [EnrichConfigurationRequest](#cnpgi-identity-v1-EnrichConfigurationRequest)
- [EnrichConfigurationRequest.ConfigsEntry](#cnpgi-identity-v1-EnrichConfigurationRequest-ConfigsEntry)
- [EnrichConfigurationResult](#cnpgi-identity-v1-EnrichConfigurationResult)
- [EnrichConfigurationResult.ConfigsEntry](#cnpgi-identity-v1-EnrichConfigurationResult-ConfigsEntry)
- [PostgresCapabilitiesRequest](#cnpgi-identity-v1-PostgresCapabilitiesRequest)
- [PostgresCapabilitiesResult](#cnpgi-identity-v1-PostgresCapabilitiesResult)
- [PostgresCapability](#cnpgi-identity-v1-PostgresCapability)
- [PostgresCapability.RPC](#cnpgi-identity-v1-PostgresCapability-RPC)

- [PostgresCapability.RPC.Type](#cnpgi-identity-v1-PostgresCapability-RPC-Type)

- [Postgres](#cnpgi-identity-v1-Postgres)

- [reconciler.proto](#reconciler-proto)
- [ReconcilerHooksCapabilitiesRequest](#cnpgi-reconciler-v1-ReconcilerHooksCapabilitiesRequest)
- [ReconcilerHooksCapabilitiesResult](#cnpgi-reconciler-v1-ReconcilerHooksCapabilitiesResult)
Expand Down Expand Up @@ -844,6 +858,162 @@ The operator type corresponds to the Kubernetes API method



<a name="postgres-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## postgres.proto



<a name="cnpgi-identity-v1-EnrichConfigurationRequest"></a>

### EnrichConfigurationRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| configs | [EnrichConfigurationRequest.ConfigsEntry](#cnpgi-identity-v1-EnrichConfigurationRequest-ConfigsEntry) | repeated | This field is REQUIRED and represent the PostgreSQL configuration parameters as generated by the instance manager |






<a name="cnpgi-identity-v1-EnrichConfigurationRequest-ConfigsEntry"></a>

### EnrichConfigurationRequest.ConfigsEntry



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| value | [string](#string) | | |






<a name="cnpgi-identity-v1-EnrichConfigurationResult"></a>

### EnrichConfigurationResult



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| configs | [EnrichConfigurationResult.ConfigsEntry](#cnpgi-identity-v1-EnrichConfigurationResult-ConfigsEntry) | repeated | This field is OPTIONAL. It represent the configuration parameters that need to be changed before applying a new configuration |






<a name="cnpgi-identity-v1-EnrichConfigurationResult-ConfigsEntry"></a>

### EnrichConfigurationResult.ConfigsEntry



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| value | [string](#string) | | |






<a name="cnpgi-identity-v1-PostgresCapabilitiesRequest"></a>

### PostgresCapabilitiesRequest
Intentionally empty






<a name="cnpgi-identity-v1-PostgresCapabilitiesResult"></a>

### PostgresCapabilitiesResult



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| capabilities | [PostgresCapability](#cnpgi-identity-v1-PostgresCapability) | repeated | All the capabilities that the controller service supports. This field is OPTIONAL. |






<a name="cnpgi-identity-v1-PostgresCapability"></a>

### PostgresCapability



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| rpc | [PostgresCapability.RPC](#cnpgi-identity-v1-PostgresCapability-RPC) | | |






<a name="cnpgi-identity-v1-PostgresCapability-RPC"></a>

### PostgresCapability.RPC



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [PostgresCapability.RPC.Type](#cnpgi-identity-v1-PostgresCapability-RPC-Type) | | |








<a name="cnpgi-identity-v1-PostgresCapability-RPC-Type"></a>

### PostgresCapability.RPC.Type


| Name | Number | Description |
| ---- | ------ | ----------- |
| TYPE_UNSPECIFIED | 0 | |
| TYPE_ENRICH_CONFIGURATION | 1 | TYPE_BACKUP indicates that the Plugin is able to enrich the PostgreSQL configuration via the EnrichConfiguration endpoint |







<a name="cnpgi-identity-v1-Postgres"></a>

### Postgres


| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| GetCapabilities | [PostgresCapabilitiesRequest](#cnpgi-identity-v1-PostgresCapabilitiesRequest) | [PostgresCapabilitiesResult](#cnpgi-identity-v1-PostgresCapabilitiesResult) | GetCapabilities gets the capabilities of the Backup service |
| EnrichConfiguration | [EnrichConfigurationRequest](#cnpgi-identity-v1-EnrichConfigurationRequest) | [EnrichConfigurationResult](#cnpgi-identity-v1-EnrichConfigurationResult) | EnrichConfiguration is called before applying the configuration to PostgreSQL |





<a name="reconciler-proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down
Loading

0 comments on commit b8e17e4

Please sign in to comment.