Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCacheOptions added in v0.5.0

func BuildCacheOptions(secretSelector labels.Selector, watchAllSecrets bool, tlsClusterProfile bool) cache.Options

BuildCacheOptions builds the cache configuration for the manager.

ManagedFields are stripped from all cached objects via DefaultTransform to reduce memory usage. Per-object Transforms override DefaultTransform, so they also strip ManagedFields explicitly.

Operator-created resources (Deployment, StatefulSet, ConfigMap, Service) are filtered by the fixed label app.kubernetes.io/managed-by=perses-operator.

CRD resources (PersesDashboard, PersesDatasource, PersesGlobalDatasource) are not cached here — their controllers use builder.OnlyMetadata and APIReader instead.

Secrets are filtered by secretSelector. If secretSelector is nil (no flag provided), the default label perses.dev/watch=true is used. If watchAllSecrets is true, no label filter is applied to secrets (preserving pre-change behavior). Secret data is always stripped from the cache via Transform regardless of label filtering.

func ParseSecretLabelSelector

func ParseSecretLabelSelector(raw string) (labels.Selector, error)

ParseSecretLabelSelector parses a label selector string using the native Kubernetes label selector syntax (e.g. "key=value,key2!=value2,key3 in (a,b)"). Returns nil for an empty input string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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