certificates

package
v0.0.0-...-711439c Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCertPath

func WithCertPath(path string) func(*options)

func WithLogger

func WithLogger(log func(msg string, keysAndValues ...any)) func(*options)

func WithPluralizer

func WithPluralizer(p pluralizer.PluralizerInterface) func(*options)

Types

type CertManager

type CertManager struct {
	// contains filtered or unexported fields
}

func NewCertManager

func NewCertManager(o Opts, optsFuncs ...FuncOption) (*CertManager, error)

func (*CertManager) GetCABundle

func (m *CertManager) GetCABundle() []byte

func (*CertManager) GetCertsPath

func (m *CertManager) GetCertsPath() string

func (*CertManager) GetServiceName

func (m *CertManager) GetServiceName() string

func (*CertManager) GetServiceNamespace

func (m *CertManager) GetServiceNamespace() string

func (*CertManager) ManageCertificates

func (m *CertManager) ManageCertificates(ctx context.Context, gvr schema.GroupVersionResource) error

func (*CertManager) RefreshCertificates

func (m *CertManager) RefreshCertificates() error

func (*CertManager) UpdateExistingResources

func (m *CertManager) UpdateExistingResources(ctx context.Context) error

type CertManagerInterface

type CertManagerInterface interface {
	ManageCertificates(ctx context.Context, gvr schema.GroupVersionResource) error
	GetCABundle() []byte
	GetServiceName() string
	GetServiceNamespace() string
	UpdateExistingResources(ctx context.Context) error
}

CertManagerInterface abstracts certificate lifecycle management for testability.

type CertificateReconciler

type CertificateReconciler struct {
	// contains filtered or unexported fields
}

CertificateReconciler manages certificate lifecycle independently from the main controller. It runs on a periodic schedule to ensure certificates are refreshed and CA bundles are propagated to CRDs and Mutating Webhook Configurations.

func NewCertificateReconciler

func NewCertificateReconciler(
	certManager CertManagerInterface,
	pluralizer pluralizer.PluralizerInterface,
	log logging.Logger,
	syncInterval time.Duration,
) *CertificateReconciler

NewCertificateReconciler creates a new CertificateReconciler instance.

func (*CertificateReconciler) SetupWithManager

func (r *CertificateReconciler) SetupWithManager(mgr interface{}) error

SetupWithManager sets up the CertificateReconciler with a controller-runtime manager. This is a no-op since the reconciler doesn't watch any resources, but is provided for consistency with the controller-runtime interfaces.

func (*CertificateReconciler) Start

Start implements the Runnable interface and begins periodic certificate reconciliation.

type FuncOption

type FuncOption func(o *options)

type Opts

type Opts struct {
	WebhookServiceName          string
	WebhookServiceNamespace     string
	MutatingWebhookTemplatePath string
	CertOpts                    certs.GenerateClientCertAndKeyOpts
	RestConfig                  *rest.Config
}

Jump to

Keyboard shortcuts

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