Skip to content

Commit

Permalink
feat: add deregister capabilities (#75)
Browse files Browse the repository at this point in the history
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Co-authored-by: Leonardo Cecchi <[email protected]>
  • Loading branch information
armru and leonardoce authored Aug 6, 2024
1 parent 00dc9ef commit 9ea12e7
Show file tree
Hide file tree
Showing 7 changed files with 394 additions and 154 deletions.
77 changes: 45 additions & 32 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,25 @@ BackupCapabilitiesResult
BackupCapability
BackupRequest
BackupResult
bignum
bool
boolean
ByteString
CloudNativePG
cncf
cnpg
csi
customizable
customizations
edb
DEREGISTER
Deregister
DeregisterRequest
DeregisterResponse
FalseClass
fixnum
GetCapabilities
GetPluginCapabilities
GetPluginCapabilitiesRequest
GetPluginCapabilitiesResponse
GetPluginMetadata
GetPluginMetadataRequest
GetPluginMetadataResponse
gRPC
html
https
ietf
json
JSONPatch
kube
kubernetes
lifecycle
LifecycleHook
lsn
ManifestEntry
MetadataEntry
MutateCluster
Expand All @@ -58,15 +46,12 @@ OperatorValidateClusterChangeResult
OperatorValidateClusterCreateRequest
OperatorValidateClusterCreateResult
ParametersEntry
pluggable
PluginCapability
pluginName
postgres
Pre
ProbeRequest
ProbeResponse
proto
reconciler
RPC
RPCs
ReconcilerHooks
ReconcilerHooksCapabilitiesRequest
ReconcilerHooksCapabilitiesResult
Expand All @@ -86,22 +71,11 @@ SetClusterStatusResponse
SetFirstRequired
SetFirstRequiredRequest
SetFirstRequiredResult
sfixed
sint
slonik
str
tablespace
TrueClass
uint
ulong
unicode
url
utf
ValidateClusterChange
ValidateClusterCreate
ValidateCreate
ValidationError
wal
WALArchiveRequest
WALArchiveResult
WALCapabilitiesRequest
Expand All @@ -112,4 +86,43 @@ WALRestoreResult
WALService
WALStatusRequest
WALStatusResult
alphanumerics
bignum
bool
boolean
cncf
cnpg
csi
customizable
customizations
edb
fixnum
gRPC
html
https
ietf
json
kubernetes
lifecycle
lsn
pluggable
pluginName
postgres
proto
reconciler
reconcilers
requeue
rfc
rpc
sfixed
sint
slonik
str
tablespace
uint
ulong
unicode
url
utf
wal
webhook
30 changes: 30 additions & 0 deletions docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
- [Identity](#cnpgi-identity-v1-Identity)

- [operator.proto](#operator-proto)
- [DeregisterRequest](#cnpgi-operator-v1-DeregisterRequest)
- [DeregisterResponse](#cnpgi-operator-v1-DeregisterResponse)
- [OperatorCapabilitiesRequest](#cnpgi-operator-v1-OperatorCapabilitiesRequest)
- [OperatorCapabilitiesResult](#cnpgi-operator-v1-OperatorCapabilitiesResult)
- [OperatorCapability](#cnpgi-operator-v1-OperatorCapability)
Expand Down Expand Up @@ -452,6 +454,31 @@ Intentionally empty.



<a name="cnpgi-operator-v1-DeregisterRequest"></a>

### DeregisterRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| definition | [bytes](#bytes) | | This field is REQUIRED. Value of this field is the JSON serialization of the Cluster that should receive the default values |






<a name="cnpgi-operator-v1-DeregisterResponse"></a>

### DeregisterResponse







<a name="cnpgi-operator-v1-OperatorCapabilitiesRequest"></a>

### OperatorCapabilitiesRequest
Expand Down Expand Up @@ -659,6 +686,7 @@ Intentionally empty.
| TYPE_VALIDATE_CLUSTER_CHANGE | 2 | TYPE_VALIDATE_CLUSTER_CHANGE indicates that the Plugin is able to reply to the ValidateClusterChange RPC request |
| TYPE_MUTATE_CLUSTER | 3 | TYPE_MUTATE_CLUSTER indicates that the Plugin is able to reply to the MutateCluster RPC request |
| TYPE_SET_CLUSTER_STATUS | 5 | TYPE_SET_CLUSTER_STATUS indicates that the Plugin is able to set cluster status |
| TYPE_DEREGISTER | 6 | TYPE_DEREGISTER indicates that the Plugin is able to execute the cleanup logic once it is removed from the cluster definition |



Expand All @@ -678,6 +706,7 @@ Intentionally empty.
| ValidateClusterChange | [OperatorValidateClusterChangeRequest](#cnpgi-operator-v1-OperatorValidateClusterChangeRequest) | [OperatorValidateClusterChangeResult](#cnpgi-operator-v1-OperatorValidateClusterChangeResult) | ValidateClusterChange improves the behavior of the validating webhook of is called on updates of the Cluster resources |
| MutateCluster | [OperatorMutateClusterRequest](#cnpgi-operator-v1-OperatorMutateClusterRequest) | [OperatorMutateClusterResult](#cnpgi-operator-v1-OperatorMutateClusterResult) | MutateCluster fills in the defaults inside a Cluster resource |
| SetClusterStatus | [SetClusterStatusRequest](#cnpgi-operator-v1-SetClusterStatusRequest) | [SetClusterStatusResponse](#cnpgi-operator-v1-SetClusterStatusResponse) | SetClusterStatus is invoked at the end of the reconciliation loop and it is used to set the plugin status inside the .status.plugins[pluginName] map key |
| Deregister | [DeregisterRequest](#cnpgi-operator-v1-DeregisterRequest) | [DeregisterResponse](#cnpgi-operator-v1-DeregisterResponse) | Deregister is invoked when the plugin is removed from the cluster definition. It is expected that the plugin executes its cleanup logic when this method is invoked. |



Expand Down Expand Up @@ -793,6 +822,7 @@ The operator type corresponds to the Kubernetes API method
| TYPE_UPDATE | 2 | |
| TYPE_CREATE | 3 | |
| TYPE_DELETE | 4 | |
| TYPE_DEREGISTER | 5 | |



Expand Down
86 changes: 45 additions & 41 deletions pkg/lifecycle/operator_lifecycle.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9ea12e7

Please sign in to comment.