externalsecret

package
v0.0.0-...-f3c1a41 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ManagedKeysAnnotation is the annotation key to store managed secret keys
	ManagedKeysAnnotation = "ack-alibabacloud.com/managed-keys"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalSecretReconciler

type ExternalSecretReconciler struct {
	client.Client
	APIReader              client.Reader
	Log                    logr.Logger
	Ctx                    context.Context
	WatchNamespaces        map[string]bool
	ReconciliationPeriod   time.Duration
	CleanUpSecretOnFailure bool
	DisablePolling         bool
	RotationInterval       time.Duration // Key rotation job running interval.
	KmsLimiter             KmsLimiter
	OosLimiter             OosLimiter
	EnableCrossNamespace   bool
	RestConfig             *rest.Config
}

ExternalSecretReconciler reconciles a ExternalSecret object

func (*ExternalSecretReconciler) AddFinalizerIfNotPresent

func (r *ExternalSecretReconciler) AddFinalizerIfNotPresent(externalSec *api.ExternalSecret, finalizerName string) error

AddFinalizerIfNotPresent will check if finalizerName is the finalizers slice

func (*ExternalSecretReconciler) Reconcile

func (*ExternalSecretReconciler) Requeue

func (r *ExternalSecretReconciler) Requeue(result ctrl.Result) ctrl.Result

func (*ExternalSecretReconciler) RequeueAfter

func (r *ExternalSecretReconciler) RequeueAfter(duration time.Duration) ctrl.Result

func (*ExternalSecretReconciler) SetupWithManager

func (r *ExternalSecretReconciler) SetupWithManager(mgr ctrl.Manager, reconcileCount int) error

SetupWithManager sets up the controller with the Manager.

type ExternalSecretsPredicate

type ExternalSecretsPredicate struct{}

func (ExternalSecretsPredicate) Create

func (ExternalSecretsPredicate) Delete

func (ExternalSecretsPredicate) Generic

func (ExternalSecretsPredicate) Update

type KmsLimiter

type KmsLimiter struct {
	SecretPullLimiter *rate.Limiter
}

func (KmsLimiter) Wait

func (k KmsLimiter) Wait(c context.Context) error

type OosLimiter

type OosLimiter struct {
	SecretPullLimiter *rate.Limiter
}

func (OosLimiter) Wait

func (o OosLimiter) Wait(c context.Context) error

type PullLimit

type PullLimit interface {
	Wait(context.Context) error
}

type SimpleSecretOperationHandler

type SimpleSecretOperationHandler struct {
	Client                 client.Client
	CleanUpSecretOnFailure bool
	Log                    logr.Logger
}

SimpleSecretOperationHandler Simple Secret operation handler

func NewSimpleSecretOperationHandler

func NewSimpleSecretOperationHandler(client client.Client, cleanUpSecretOnFailure bool, log logr.Logger) *SimpleSecretOperationHandler

NewSimpleSecretOperationHandler Create new Secret operation handler

func (*SimpleSecretOperationHandler) HandleSecretOperation

func (h *SimpleSecretOperationHandler) HandleSecretOperation(
	ctx context.Context,
	externalSec *api.ExternalSecret,
	secretData map[string][]byte,
	currentData map[string][]byte,
	metadataTargets map[string]map[string]string,
) error

HandleSecretOperation Handle complete Secret operation flow Original behavior: creates/updates secrets WITHOUT owner reference

type SimpleTemplateProcessor

type SimpleTemplateProcessor struct {
	Client client.Client
	// contains filtered or unexported fields
}

SimpleTemplateProcessor Template processor

func NewSimpleTemplateProcessor

func NewSimpleTemplateProcessor(client client.Client) *SimpleTemplateProcessor

NewSimpleTemplateProcessor creates a new template processor with initialized function map

func (*SimpleTemplateProcessor) ProcessAllTemplates

func (stp *SimpleTemplateProcessor) ProcessAllTemplates(
	ctx context.Context,
	externalSec *api.ExternalSecret,
	rawData map[string][]byte,
) (*UnifiedTemplateResult, error)

ProcessAllTemplates processes all template configurations with context

type UnifiedTemplateResult

type UnifiedTemplateResult struct {
	// Processed secret data
	Data map[string][]byte

	// Metadata that will be applied to the target secret
	Metadata struct {
		Labels      map[string]string
		Annotations map[string]string
	}

	// Processing statistics
	Stats struct {
		DataTemplatesProcessed     int
		TemplateFromProcessed      int
		MetadataTemplatesProcessed int
		Errors                     []string
		FatalErrors                []string // New: track fatal errors separately
	}
}

UnifiedTemplateResult represents the complete result of all template processing

type WrappedClient

type WrappedClient struct {
	client.Client
	KubeClient kubernetes.Interface
}

WrappedClient wraps both controller-runtime client and kubernetes client

func (*WrappedClient) GetKubeClient

func (w *WrappedClient) GetKubeClient() kubernetes.Interface

GetKubeClient returns the kubernetes client interface

Jump to

Keyboard shortcuts

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