resolvers

package
v1.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TEST_NAMESPACE = "default"
	TEST_CONFIGMAP = "myconfigmap"
	LabelCacheKey  = "cache.kyverno.io/enabled"
)

Variables

This section is empty.

Functions

func GetCacheInformerFactory

func GetCacheInformerFactory(client kubernetes.Interface, resyncPeriod time.Duration) (kubeinformers.SharedInformerFactory, error)

func GetCacheSelector

func GetCacheSelector() (labels.Selector, error)

Types

type ConfigmapResolver

type ConfigmapResolver = NamespacedResourceResolver[*corev1.ConfigMap]

func NewClientBasedResolver

func NewClientBasedResolver(client kubernetes.Interface) (ConfigmapResolver, error)

func NewInformerBasedResolver

func NewInformerBasedResolver(lister corev1listers.ConfigMapLister) (ConfigmapResolver, error)

func NewResolverChain

func NewResolverChain(resolvers ...ConfigmapResolver) (ConfigmapResolver, error)

type NamespacedResourceResolver

type NamespacedResourceResolver[T any] interface {
	Get(context.Context, string, string) (T, error)
}

Jump to

Keyboard shortcuts

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