configuration

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 24 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(reflectorConfig *generic.ReflectorConfig) 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, reflectorConfig *generic.ReflectorConfig) manager.Reflector

NewSecretReflector builds a SecretReflector.

func NewServiceAccountReflector added in v0.7.0

func NewServiceAccountReflector(enableSAReflection bool, reflectorConfig *generic.ReflectorConfig) 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, nodename 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) List added in v0.9.0

func (fsar *FallbackServiceAccountReflector) List() ([]interface{}, error)

List returns a list of all service account tokens managed by the reflector.

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) List added in v0.9.0

func (ncr *NamespacedConfigMapReflector) List() ([]interface{}, error)

List returns the list of objects.

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.

func (*NamespacedConfigMapReflector) ShouldSkipReflection added in v0.10.0

func (ncr *NamespacedConfigMapReflector) ShouldSkipReflection(obj metav1.Object) (bool, error)

ShouldSkipReflection returns whether the reflection of the given object should be skipped.

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.

func (*NamespacedSecretReflector) List added in v0.9.0

func (nsr *NamespacedSecretReflector) List() ([]interface{}, error)

List returns the list of objects to be 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.

func (*NamespacedServiceAccountReflector) List added in v0.9.0

func (nsar *NamespacedServiceAccountReflector) List() ([]interface{}, error)

List returns a list of all service account tokens managed by the reflector.

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