Documentation
¶
Index ¶
- Constants
- type ExternalSecretReconciler
- func (r *ExternalSecretReconciler) AddFinalizerIfNotPresent(externalSec *api.ExternalSecret, finalizerName string) error
- func (r *ExternalSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ExternalSecretReconciler) Requeue(result ctrl.Result) ctrl.Result
- func (r *ExternalSecretReconciler) RequeueAfter(duration time.Duration) ctrl.Result
- func (r *ExternalSecretReconciler) SetupWithManager(mgr ctrl.Manager, reconcileCount int) error
- type ExternalSecretsPredicate
- type KmsLimiter
- type OosLimiter
- type PullLimit
- type SimpleSecretOperationHandler
- type SimpleTemplateProcessor
- type UnifiedTemplateResult
- type WrappedClient
Constants ¶
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) 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 (p ExternalSecretsPredicate) Create(e event.CreateEvent) bool
func (ExternalSecretsPredicate) Delete ¶
func (p ExternalSecretsPredicate) Delete(e event.DeleteEvent) bool
func (ExternalSecretsPredicate) Generic ¶
func (p ExternalSecretsPredicate) Generic(e event.GenericEvent) bool
func (ExternalSecretsPredicate) Update ¶
func (p ExternalSecretsPredicate) Update(e event.UpdateEvent) bool
type KmsLimiter ¶
type OosLimiter ¶
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