configuration

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package configuration implements the reflection logic for configmaps and secrets.

Index

Constants

View Source
const (
	// ConfigMapReflectorName is the name associated with the ConfigMap reflector.
	ConfigMapReflectorName = "ConfigMap"
)
View Source
const (
	// SecretReflectorName is the name associated with the Secret reflector.
	SecretReflectorName = "Secret"
)
View Source
const (
	// ServiceAccountReflectorName is the name associated with the ServiceAccount reflector.
	ServiceAccountReflectorName = "ServiceAccount"
)

Variables

This section is empty.

Functions

func NewConfigMapReflector

func NewConfigMapReflector(workers uint) manager.Reflector

NewConfigMapReflector builds a ConfigMapReflector.

func NewNamespacedConfigMapReflector

func NewNamespacedConfigMapReflector(opts *options.NamespacedOpts) manager.NamespacedReflector

NewNamespacedConfigMapReflector returns a function generating NamespacedConfigMapReflector instances.

func NewNamespacedSecretReflector

func NewNamespacedSecretReflector(enableSAReflection bool) func(*options.NamespacedOpts) manager.NamespacedReflector

NewNamespacedSecretReflector returns a function generating NamespacedSecretReflector instances.

func NewSecretReflector

func NewSecretReflector(enableSAReflection bool, workers uint) manager.Reflector

NewSecretReflector builds a SecretReflector.

func NewServiceAccountReflector added in v0.7.0

func NewServiceAccountReflector(enableSAReflection bool, workers uint) manager.Reflector

NewServiceAccountReflector builds a ServiceAccountReflector.

func RemoteConfigMapNamespacedKeyer added in v0.5.0

func RemoteConfigMapNamespacedKeyer(namespace string) func(metadata metav1.Object) []types.NamespacedName

RemoteConfigMapNamespacedKeyer returns a keyer associated with the given namespace, which accounts for the root CA configmap name remapping.

func RemoteSASecretNamespacedKeyer added in v0.7.0

func RemoteSASecretNamespacedKeyer(namespace string) func(metadata metav1.Object) []types.NamespacedName

RemoteSASecretNamespacedKeyer returns a keyer associated with the given namespace, which accounts for enqueuing only the secrets associated with a service account (enqueuing the owner pod name).

Types

type FallbackServiceAccountReflector added in v0.7.0

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

FallbackServiceAccountReflector handles the "orphan" pods outside the managed namespaces. It ensures that the events for already existing pods are correctly emitted if the corresponding namespace gets offloaded afterwards.

func (*FallbackServiceAccountReflector) Handle added in v0.7.0

Handle operates as fallback to reconcile pod objects not managed by namespaced handlers.

func (*FallbackServiceAccountReflector) Keys added in v0.7.0

Keys returns a set of keys to be enqueued for fallback processing for the given namespace pair.

func (*FallbackServiceAccountReflector) Ready added in v0.7.0

func (fsar *FallbackServiceAccountReflector) Ready() bool

Ready returns whether the FallbackReflector is completely initialized.

type NamespacedConfigMapReflector

type NamespacedConfigMapReflector struct {
	generic.NamespacedReflector
	// contains filtered or unexported fields
}

NamespacedConfigMapReflector manages the ConfigMap reflection.

func (*NamespacedConfigMapReflector) Handle

func (ncr *NamespacedConfigMapReflector) Handle(ctx context.Context, name string) error

Handle is responsible for reconciling the given object and ensuring it is correctly reflected.

func (*NamespacedConfigMapReflector) RemoteRef added in v0.5.0

func (ncr *NamespacedConfigMapReflector) RemoteRef(name string) klog.ObjectRef

RemoteRef returns the ObjectRef associated with the remote namespace.

type NamespacedSecretReflector

type NamespacedSecretReflector struct {
	generic.NamespacedReflector
	// contains filtered or unexported fields
}

NamespacedSecretReflector manages the Secret reflection.

func (*NamespacedSecretReflector) Handle

func (nsr *NamespacedSecretReflector) Handle(ctx context.Context, name string) error

Handle is responsible for reconciling the given object and ensuring it is correctly reflected.

type NamespacedServiceAccountReflector added in v0.7.0

type NamespacedServiceAccountReflector struct {
	generic.NamespacedReflector
	// contains filtered or unexported fields
}

NamespacedServiceAccountReflector manages the reflection of tokens associated with ServiceAccounts.

func (*NamespacedServiceAccountReflector) Handle added in v0.7.0

Handle is responsible for reconciling the given object and ensuring it is correctly reflected.

type ServiceAccountReflector added in v0.7.0

type ServiceAccountReflector struct {
	manager.Reflector
	// contains filtered or unexported fields
}

ServiceAccountReflector manages the reflection of tokens associated with ServiceAccounts.

func (*ServiceAccountReflector) NewFallback added in v0.7.0

NewFallback returns a new FallbackReflector instance.

func (*ServiceAccountReflector) NewNamespaced added in v0.7.0

NewNamespaced returns a new NamespacedServiceAccountReflector instance.

func (*ServiceAccountReflector) Start added in v0.7.0

Start starts the reflector.

Jump to

Keyboard shortcuts

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