internal

package
v1.9.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Context = context.Background()

Functions

func CheckCacheSync

func CheckCacheSync[T comparable](logger logr.Logger, status map[T]bool) bool

func CreateClientConfig

func CreateClientConfig(logger logr.Logger) *rest.Config

func CreateDClient

func CreateDClient(logger logr.Logger, ctx context.Context, dyn dynamic.Interface, kube kubernetes.Interface, resync time.Duration) dclient.Interface

func CreateDynamicClient

func CreateDynamicClient(logger logr.Logger, opts ...dyn.NewOption) dynamic.Interface

func CreateKubernetesClient

func CreateKubernetesClient(logger logr.Logger, opts ...kube.NewOption) kubernetes.Interface

func CreateKyvernoClient

func CreateKyvernoClient(logger logr.Logger, opts ...kyverno.NewOption) versioned.Interface

func CreateMetadataClient

func CreateMetadataClient(logger logr.Logger, opts ...meta.NewOption) metadata.Interface

func GetMetricsConfiguration

func GetMetricsConfiguration(logger logr.Logger, client kubernetes.Interface) config.MetricsConfiguration

func InitFlags

func InitFlags(config Configuration)

func ParseFlags

func ParseFlags(config Configuration)

func SetupLogger

func SetupLogger() logr.Logger

func SetupMaxProcs

func SetupMaxProcs(logger logr.Logger) func()

func SetupProfiling

func SetupProfiling(logger logr.Logger)

func SetupSignals

func SetupSignals(logger logr.Logger) (context.Context, context.CancelFunc)

func SetupTracing

func SetupTracing(logger logr.Logger, name string, kubeClient kubernetes.Interface) context.CancelFunc

func ShowVersion

func ShowVersion(logger logr.Logger)

func StartInformers

func StartInformers[T startable](ctx context.Context, informers ...T)

func StartInformersAndWaitForCacheSync

func StartInformersAndWaitForCacheSync(ctx context.Context, logger logr.Logger, informers ...informer) bool

func WaitForCacheSync

func WaitForCacheSync(ctx context.Context, logger logr.Logger, informers ...informer) bool

Types

type Configuration

type Configuration interface {
	UsesMetrics() bool
	UsesTracing() bool
	UsesProfiling() bool
	UsesKubeconfig() bool
	FlagSets() []*flag.FlagSet
}

func NewConfiguration

func NewConfiguration(options ...ConfigurationOption) Configuration

type ConfigurationOption

type ConfigurationOption func(c *configuration)

func WithFlagSets

func WithFlagSets(flagsets ...*flag.FlagSet) ConfigurationOption

func WithKubeconfig

func WithKubeconfig() ConfigurationOption

func WithMetrics

func WithMetrics() ConfigurationOption

func WithProfiling

func WithProfiling() ConfigurationOption

func WithTracing

func WithTracing() ConfigurationOption

type Controller

type Controller interface {
	Run(context.Context, logr.Logger, *sync.WaitGroup)
}

func NewController

func NewController(name string, c controllers.Controller, w int) Controller

Jump to

Keyboard shortcuts

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