Documentation ¶
Overview ¶
Package operator implements the capabilities used by CNPG
Index ¶
- func InjectPluginSidecarPodSpec(spec *corev1.PodSpec, sidecar *corev1.Container, mainContainerName string, ...) error
- func InjectPluginVolumePodSpec(spec *corev1.PodSpec, mainContainerName string)
- func Start(ctx context.Context) error
- type CNPGI
- type IdentityImplementation
- func (i IdentityImplementation) GetPluginCapabilities(_ context.Context, _ *identity.GetPluginCapabilitiesRequest) (*identity.GetPluginCapabilitiesResponse, error)
- func (i IdentityImplementation) GetPluginMetadata(_ context.Context, _ *identity.GetPluginMetadataRequest) (*identity.GetPluginMetadataResponse, error)
- func (i IdentityImplementation) Probe(_ context.Context, _ *identity.ProbeRequest) (*identity.ProbeResponse, error)
- type LifecycleImplementation
- func (impl LifecycleImplementation) GetCapabilities(_ context.Context, _ *lifecycle.OperatorLifecycleCapabilitiesRequest) (*lifecycle.OperatorLifecycleCapabilitiesResponse, error)
- func (impl LifecycleImplementation) LifecycleHook(ctx context.Context, request *lifecycle.OperatorLifecycleRequest) (*lifecycle.OperatorLifecycleResponse, error)
- type ReconcilerImplementation
- func (r ReconcilerImplementation) GetCapabilities(_ context.Context, _ *reconciler.ReconcilerHooksCapabilitiesRequest) (*reconciler.ReconcilerHooksCapabilitiesResult, error)
- func (r ReconcilerImplementation) Post(_ context.Context, _ *reconciler.ReconcilerHooksRequest) (*reconciler.ReconcilerHooksResult, error)
- func (r ReconcilerImplementation) Pre(ctx context.Context, request *reconciler.ReconcilerHooksRequest) (*reconciler.ReconcilerHooksResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectPluginSidecarPodSpec ¶
func InjectPluginSidecarPodSpec( spec *corev1.PodSpec, sidecar *corev1.Container, mainContainerName string, injectMainContainerVolumes bool, ) error
InjectPluginSidecarPodSpec injects a plugin sidecar into a CNPG Pod spec.
If the "injectMainContainerVolumes" flag is true, this will append all the volume mounts that are used in the instance manager Pod to the passed sidecar container, granting it superuser access to the PostgreSQL instance.
func InjectPluginVolumePodSpec ¶
InjectPluginVolumePodSpec injects the plugin volume into a CNPG Pod spec.
Types ¶
type CNPGI ¶
type CNPGI struct { Client client.Client PluginPath string ServerCertPath string ServerKeyPath string ClientCertPath string ServerAddress string }
CNPGI is the implementation of the CNPG-i server
type IdentityImplementation ¶
type IdentityImplementation struct {
identity.UnimplementedIdentityServer
}
IdentityImplementation is the implementation of the CNPG-i Identity entrypoint
func (IdentityImplementation) GetPluginCapabilities ¶
func (i IdentityImplementation) GetPluginCapabilities( _ context.Context, _ *identity.GetPluginCapabilitiesRequest, ) (*identity.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities implements identity
func (IdentityImplementation) GetPluginMetadata ¶
func (i IdentityImplementation) GetPluginMetadata( _ context.Context, _ *identity.GetPluginMetadataRequest, ) (*identity.GetPluginMetadataResponse, error)
GetPluginMetadata implements Identity
func (IdentityImplementation) Probe ¶
func (i IdentityImplementation) Probe( _ context.Context, _ *identity.ProbeRequest, ) (*identity.ProbeResponse, error)
Probe implements Identity
type LifecycleImplementation ¶
type LifecycleImplementation struct { lifecycle.UnimplementedOperatorLifecycleServer Client client.Client }
LifecycleImplementation is the implementation of the lifecycle handler
func (LifecycleImplementation) GetCapabilities ¶
func (impl LifecycleImplementation) GetCapabilities( _ context.Context, _ *lifecycle.OperatorLifecycleCapabilitiesRequest, ) (*lifecycle.OperatorLifecycleCapabilitiesResponse, error)
GetCapabilities exposes the lifecycle capabilities
func (LifecycleImplementation) LifecycleHook ¶
func (impl LifecycleImplementation) LifecycleHook( ctx context.Context, request *lifecycle.OperatorLifecycleRequest, ) (*lifecycle.OperatorLifecycleResponse, error)
LifecycleHook is called when creating Kubernetes services
type ReconcilerImplementation ¶
type ReconcilerImplementation struct { Client client.Client reconciler.UnimplementedReconcilerHooksServer }
ReconcilerImplementation implements the Reconciler capability
func (ReconcilerImplementation) GetCapabilities ¶
func (r ReconcilerImplementation) GetCapabilities( _ context.Context, _ *reconciler.ReconcilerHooksCapabilitiesRequest, ) (*reconciler.ReconcilerHooksCapabilitiesResult, error)
GetCapabilities implements the Reconciler interface
func (ReconcilerImplementation) Post ¶
func (r ReconcilerImplementation) Post( _ context.Context, _ *reconciler.ReconcilerHooksRequest, ) (*reconciler.ReconcilerHooksResult, error)
Post implements the reconciler interface
func (ReconcilerImplementation) Pre ¶
func (r ReconcilerImplementation) Pre( ctx context.Context, request *reconciler.ReconcilerHooksRequest, ) (*reconciler.ReconcilerHooksResult, error)
Pre implements the reconciler interface
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package config contains the functions to parse the plugin configuration
|
Package config contains the functions to parse the plugin configuration |
Package specs contains the specification of the kubernetes objects that are created by the plugin
|
Package specs contains the specification of the kubernetes objects that are created by the plugin |