config

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRestConfig

func BuildRestConfig(rtCfg RuntimeConfig) (*rest.Config, error)

BuildRestConfig builds the REST config for the controller runtime

func BuildRuntimeOptions

func BuildRuntimeOptions(rtCfg RuntimeConfig, scheme *runtime.Scheme) ctrl.Options

BuildRuntimeOptions builds the options for the controller runtime based on config

func NewConfigmapManager added in v0.5.1

func NewConfigmapManager(resourceRef types.NamespacedName, clientSet *kubernetes.Clientset,
	cancelFn context.CancelFunc, configmapCheckFunction func(configMap *corev1.ConfigMap) bool, logger logr.Logger) *defaultConfigmapManager

Types

type ConfigmapManager added in v0.5.1

type ConfigmapManager interface {
	MonitorConfigMap(ctx context.Context) error
	IsControllerEnabled() bool
}

type ControllerConfig

type ControllerConfig struct {
	// Log level for the controller logs
	LogLevel string
	// EndpointChunkSize specifies the number of endpoints to include in a single chunk
	EndpointChunkSize int
	// EnableConfigMapCheck enables checking the configmap for starting the NP controller
	EnableConfigMapCheck bool
	// MaxConcurrentReconciles specifies the max number of reconcile loops
	MaxConcurrentReconciles int
	// PodUpdateBatchPeriodDuration specifies the duration between batch updates of pods
	PodUpdateBatchPeriodDuration time.Duration
	// Configurations for the Controller Runtime
	RuntimeConfig RuntimeConfig
}

ControllerConfig contains the controller configuration

func (*ControllerConfig) BindFlags

func (cfg *ControllerConfig) BindFlags(fs *pflag.FlagSet)

type RuntimeConfig

type RuntimeConfig struct {
	APIServer               string
	KubeConfig              string
	MetricsBindAddress      string
	HealthProbeBindAddress  string
	EnableLeaderElection    bool
	LeaderElectionID        string
	LeaderElectionNamespace string
	WatchNamespace          string
	SyncPeriod              time.Duration
}

RuntimeConfig stores the configuration for the controller-runtime

func (*RuntimeConfig) BindFlags

func (c *RuntimeConfig) BindFlags(fs *pflag.FlagSet)

Jump to

Keyboard shortcuts

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