config

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config allows to override some of the default settings from the exported default config package.

Package config allows to override some of the default settings from the exported default config package.

Index

Constants

This section is empty.

Variables

View Source
var (
	StunnerdImage       = "l7mp/stunnerd:latest"
	ConfigWatcherName   = "config-watcher"
	ConfigWatcherImage  = "kiwigrid/k8s-sidecar:latest"
	ConfigVolumeName    = "stunnerd-config-volume"
	TerminationGrace    = int64(3600)
	LivenessProbeAction = corev1.HTTPGetAction{
		Path:   "/live",
		Port:   apiutil.FromInt(8086),
		Scheme: "HTTP",
	}
	LivenessProbe = corev1.Probe{
		ProbeHandler:  corev1.ProbeHandler{HTTPGet: &LivenessProbeAction},
		PeriodSeconds: 15, SuccessThreshold: 1, FailureThreshold: 3, TimeoutSeconds: 1,
	}
	ReadinessProbeAction = corev1.HTTPGetAction{
		Path:   "/ready",
		Port:   apiutil.FromInt(8086),
		Scheme: "HTTP",
	}
	ReadinessProbe = corev1.Probe{
		ProbeHandler:  corev1.ProbeHandler{HTTPGet: &ReadinessProbeAction},
		PeriodSeconds: 15, SuccessThreshold: 1, FailureThreshold: 3, TimeoutSeconds: 1,
	}
	CPURequest      = resource.MustParse("250m")
	MemoryLimit     = resource.MustParse("20M")
	ResourceRequest = corev1.ResourceList(map[corev1.ResourceName]resource.Quantity{
		corev1.ResourceCPU: CPURequest,
	})
	ResourceLimit = corev1.ResourceList(map[corev1.ResourceName]resource.Quantity{
		corev1.ResourceMemory: MemoryLimit,
	})
)
View Source
var (
	// ControllerName is the current controller name which indicates this operator's name
	ControllerName = opdefault.DefaultControllerName

	// ConfigMapName names a ConfigMap the operator renders the stunnerd config file into
	ConfigMapName = opdefault.DefaultConfigMapName

	// EnableEndpointDiscovery enables EDS for finding the UDP-route backend endpoints
	EnableEndpointDiscovery = opdefault.DefaultEnableEndpointDiscovery

	// EnableRelayToClusterIP allows clients to create transport relay connections directly to
	// the ClusterIP of a Kubernetes service. This is useful for hiding the pod IPs behind the
	// ClusterIP. If both EnableEndpointDiscovery and EnableRelayToClusterIP are on, clients
	// can connect to both the ClusterIP and any direct pod IP.
	EnableRelayToClusterIP = opdefault.DefaultEnableRelayToClusterIP

	// ThrottleTimeout defines the amount of time to wait before initiating a new config render
	// process. This allows to rate-limit config renders in very large clusters or frequently
	// changing resources, where the config rendering process is too expensive to be run after
	// every CRUD operation on the object being watched by the operator. The larger the
	// throttle timeout the slower the controller and the smaller the operator CPU
	// consumption. Default is 250 msec.
	ThrottleTimeout = opdefault.DefaultThrottleTimeout

	// DataplaneMode is the "managed dataplane" mode. When set to "managed", the operator takes
	// care of providing the stunnerd pods for each Gateway. In "legacy" mode, the dataplanes
	// must be provided by the user.
	DataplaneMode = NewDataplaneMode(opdefault.DefaultDataplaneMode)

	// ConfigDiscoveryAddress is the default URI at which config discovery requests are served.
	ConfigDiscoveryAddress = opdefault.DefaultConfigDiscoveryAddress
)

Functions

This section is empty.

Types

type DataplaneModeType added in v0.15.1

type DataplaneModeType int

DataplaneModeType species the type of the STUN/TURN authentication mechanism used by STUNner

const (
	DataplaneModeManaged DataplaneModeType = iota // default
	DataplaneModeLegacy
)

func NewDataplaneMode added in v0.15.1

func NewDataplaneMode(raw string) DataplaneModeType

NewDataplaneModeType parses the dataplane mode specification.

func (DataplaneModeType) String added in v0.15.1

func (a DataplaneModeType) String() string

String returns a string representation for the dataplane mode.

Jump to

Keyboard shortcuts

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