config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 8 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

Types

type ControllerConfig

type ControllerConfig struct {
	// Log level for the controller logs
	LogLevel string
	// Local log file for Network Policy Agent
	LogFile string
	// MaxConcurrentReconciles specifies the max number of reconcile loops
	MaxConcurrentReconciles int
	// Enable Policy decision logs
	EnablePolicyEventLogs bool
	// Enable Policy decision logs streaming to CloudWatch
	EnableCloudWatchLogs bool
	// Enable IPv6 mode
	EnableIPv6 bool
	// Enable Network Policy
	EnableNetworkPolicy bool
	// ConntrackCacheCleanupPeriod specifies the cleanup period
	ConntrackCacheCleanupPeriod int
	// 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
	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