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
The name MUST follow domain name notation format (https://tools.ietf.org/html/rfc1035#section-2.3.1). It SHOULD include the plugin's host company name and the plugin name, to minimize the possibility of collisions. It MUST be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. This field is REQUIRED.
This field is OPTIONAL. If not present, the caller SHALL assume that the plugin is in a ready state and is accepting calls to its Controller and/or Node services (according to the plugin's reported capabilities).
PluginCapability.Service.Type
Name
Number
Description
TYPE_UNSPECIFIED
0
TYPE_OPERATOR_SERVICE
1
TYPE_OPERATOR_SERVICE indicated that the Plugin provider RPCs for the Operator service. The presence of this capability determines whether the CO will attempt to invoke the REQUIRED Operator RPCs, as well as specific RPCs as indicated by GetCapabilities.
TYPE_WAL_SERVICE
2
TYPE_WAL_SERVICE indicates that the Plugin provides RPCs for the WAL service. Plugins MAY provide this capability. The presence of this capability determines whether the CO will attempt to invoke the REQUIRED WALService RPCs, as well as specific RPCs as indicated by GetCapabilities.
TYPE_BACKUP_SERVICE
3
TYPE_BACKUP_SERVICE indicates that the Plugin provides RPCs for the Backup service. The presence of this capability determines whether the CO will attempt to invoke the REQUIRED Backup Service RPCs, as well as specific RPCs as indicated by GetCapabilities.
TYPE_LIFECYCLE_SERVICE
4
TYPE_LIFECYCLE_SERVICE indicates that the Plugin provides RPCs for the Lifecycle service.
TYPE_RECONCILER_HOOKS
5
TYPE_RECONCILER_HOOKS indicates that the Plugin provides RPCs to enhance the behavior of the reconcilers
TYPE_RESTORE_JOB
6
TYPE_RESTORE_JOB_HOOKS indicates that the Plugin provides RPCs to enhance the behavior of the restore jobs
SetStatusInCluster 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 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.
This field is REQUIRED. Value of this field is the JSON serialization of the resource being reconciled. Please note that in case of Cluster Reconciliation, the resource_definition will match the cluster_definition
ReconcilerHooksResult
ReconcilerHooksResult response is used to instruct then the CNPG controller on which action
take after the plugin execution.
This field is OPTIONAL. If true, the current reconciliation loop will be stopped and the operator will ensure that another one will be run in the requested number of seconds. IMPORTANT: the new reconciliation loop may start even before the number of specified seconds.
ReconcilerHooksCapability.Kind
Name
Number
Description
KIND_UNSPECIFIED
0
KIND_CLUSTER
1
KIND_CLUSTER indicates that the plugin will plug the Cluster reconciler
KIND_BACKUP
2
KIND_BACKUP indicates that the plugin will plug the Backup reconciler
ReconcilerHooksResult.Behavior
Name
Number
Description
BEHAVIOR_UNSPECIFIED
0
BEHAVIOR_CONTINUE
1
BEHAVIOR_CONTINUE indicates that this reconciliation loop will proceed running. BEHAVIOR_CONTINUE is useful when the plugin executes changes on internal status or resources not directly managed by the main reconciliation loop
BEHAVIOR_REQUEUE
2
BEHAVIOR_REQUEUE indicates that this reconciliation loop will be stopped and a new one will be requested. BEHAVIOR_REQUEUE should always be set when the plugin applies changes on resources that are directly managed by the main reconciliation loop
BEHAVIOR_TERMINATE
3
BEHAVIOR_TERMINATE indicates that the main reconciliation loop needs to be marked as succeeded and no further operations needs to be taken. This should be used when the invoked Reconcile hook act as a substitute for the main CNPG reconciliation loop. An example would be a plugin that substitutes the Backup logic of CNPG.
ReconcilerHooks
ReconcilerHooks offers a way for the plugins to directly execute changes on the resources
through the kube-api server.
Pre is executed before the operator executes the reconciliation loop It is a way for the plugins to directly execute changes on the resources through the kube-api server.
Post is executed after the operator executes the reconciliation loop It is a way for the plugins to directly execute changes on the resources through the kube-api server.
This field is REQUIRED. Value of this field is the name of the first required WAL in the WAL archive for this cluster (normally based on the begin WAL of the first available base backup for the cluster)