cnpgi

package
v0.0.0-...-de9510f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package cnpgi provides the implementation of the CNPG-I interfaces for the operator.

Index

Constants

View Source
const KlioPluginContainerName = "klio-plugin"

KlioPluginContainerName is the name of the Klio plugin sidecar container that handles backup creation and management in PostgreSQL pods.

Variables

This section is empty.

Functions

func InjectPluginVolumePodSpec

func InjectPluginVolumePodSpec(spec *corev1.PodSpec, mainContainerName string)

InjectPluginVolumePodSpec injects the plugin volume into a CNPG Pod spec.

Types

type CNPGI

type CNPGI struct {
	Client                         client.Client
	ServerCertPath                 string
	ServerKeyPath                  string
	ClientCertPath                 string
	ServerAddress                  string
	HaveSecurityContextConstraints bool
}

CNPGI implementation for the operator.

func (*CNPGI) Start

func (c *CNPGI) Start(ctx context.Context) error

Start the GRPC server of the operator.

type IdentityImplementation

type IdentityImplementation struct {
	identity.UnimplementedIdentityServer
}

IdentityImplementation is the implementation of the CNPG-i Identity entrypoint.

func (IdentityImplementation) GetPluginCapabilities

GetPluginCapabilities implements identity.

func (IdentityImplementation) GetPluginMetadata

GetPluginMetadata implements Identity.

func (IdentityImplementation) Probe

Probe implements Identity.

type LifecycleImplementation

type LifecycleImplementation struct {
	lifecycle.UnimplementedOperatorLifecycleServer

	Client                         client.Client
	HaveSecurityContextConstraints bool
}

LifecycleImplementation is the implementation of the lifecycle handler.

func (LifecycleImplementation) GetCapabilities

GetCapabilities exposes the lifecycle capabilities.

func (LifecycleImplementation) LifecycleHook

LifecycleHook is called when creating Kubernetes services.

type ReconcilerImplementation

type ReconcilerImplementation struct {
	reconciler.UnimplementedReconcilerHooksServer

	Client client.Client
}

ReconcilerImplementation implements the CNPG-I reconciler hooks for Klio. The Pre hook gates reconciliation when a PluginConfiguration is missing, returning BEHAVIOR_REQUEUE so the cluster waits gracefully instead of entering an unrecoverable error state.

func (ReconcilerImplementation) GetCapabilities

GetCapabilities implements the Reconciler interface.

func (ReconcilerImplementation) Post

Post is called after the reconciliation loop.

func (ReconcilerImplementation) Pre

Pre is called before each reconciliation loop. It checks that all required PluginConfiguration resources exist. When one is missing, it returns BEHAVIOR_REQUEUE so CNPG retries without entering an error state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL