operator

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WebhookSecretName is the name of the secret where the certificates
	// for the webhook server are stored
	WebhookSecretName = "cnpg-plugin-wal-g-webhook-cert" // #nosec

	// WebhookServiceName is the name of the service where the webhook server
	// is reachable
	WebhookServiceName = "cnpg-plugin-wal-g-webhook-service" // #nosec

	// MutatingWebhookConfigurationName is the name of the mutating webhook configuration
	MutatingWebhookConfigurationName = "cnpg-plugin-wal-g-mutating-webhook-configuration"

	// ValidatingWebhookConfigurationName is the name of the validating webhook configuration
	ValidatingWebhookConfigurationName = "cnpg-plugin-wal-g-validating-webhook-configuration"

	// CaSecretName is the name of the secret which is hosting the Operator CA
	CaSecretName = "cnpg-plugin-wal-g-ca-secret" // #nosec

	// OperatorDeploymentLabelSelector is the labelSelector to be used to get the operators deployment
	OperatorDeploymentLabelSelector = "app.kubernetes.io/name=cnpg-plugin-wal-g"
)

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context) error

nolint:gocyclo,funlen

Types

type CNPGI

type CNPGI struct {
	Client         client.Client
	ServerAddress  string
	PluginPath     string
	ServerCertPath string
	ServerCertName string
	ServerCertKey  string
	ClientCertPath string
	ClientCertName string
}

CNPGI is the implementation of the CNPG-i server for operator

func (*CNPGI) Start

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

Start starts the GRPC server of the operator plugin

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
}

LifecycleImplementation is the implementation of the lifecycle handler

func (LifecycleImplementation) GetCapabilities

GetCapabilities exposes the lifecycle capabilities

func (LifecycleImplementation) LifecycleHook

LifecycleHook is called on Kubernetes Pods / Jobs creation by CNPG

type ReconcilerImplementation

type ReconcilerImplementation struct {
	Client client.Client
	reconciler.UnimplementedReconcilerHooksServer
}

ReconcilerImplementation implements the Reconciler capability

func (ReconcilerImplementation) GetCapabilities

GetCapabilities implements the Reconciler interface

func (ReconcilerImplementation) Post

Post implements the reconciler interface

func (ReconcilerImplementation) Pre

Pre implements the reconciler interface

Jump to

Keyboard shortcuts

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