Documentation ¶
Overview ¶
Package config allows to override some of the default settings from the exported default config package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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(stnrconfv1.DefaultHealthCheckPort), 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(stnrconfv1.DefaultHealthCheckPort), 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, }) )
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 = stnrv1.DefaultConfigDiscoveryAddress // EndpointSliceAvailable is a global flag indicating whether EndpointSlices are available // in the current cluster. This is detected in the UDPRoute controller trying to create a // Watch for EndpointSlices. If successful, only EndpointSlices will be considered and // Endpoints support is disables. Otherwise, the opetator falls back to Endoints support // (note that this breaks graceful backend shutdown, see // https://github.com/l7mp/stunner/issues/138). EndpointSliceAvailable = opdefault.DefaultEndpointSliceAvailable // EnableFinalizer is a global config to switch operator finalization on. The finalizer // will clean up all allocaeted Kubernetes resources (like dataplane deployments and // LoadBalancer Services) on exit and invalidate Gateway API resource statuses. Use with // caution: enabling this will caluse client connections to break on operator restart. EnableFinalizer = opdefault.DefaultEnableFinalizer )
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.
type ProgressReporter ¶ added in v0.18.0
type ProgressReporter interface {
ProgressReport() int
}
ProgressReporter is a general interface ProgressTrackers must satisfy.
type ProgressTracker ¶ added in v0.18.0
type ProgressTracker struct {
// contains filtered or unexported fields
}
ProgressTracker is an embeddable object that can track and report the number of ongoing operations for some parallel process. This can be used for implementing graceful shutdown.
func NewProgressTracker ¶ added in v0.18.0
func NewProgressTracker() *ProgressTracker
NewProgressTracker creates an empty progress tracker.
func (*ProgressTracker) ProgressReport ¶ added in v0.18.0
func (t *ProgressTracker) ProgressReport() int
ProgressReport returns the number of operations in progress.
func (*ProgressTracker) ProgressUpdate ¶ added in v0.18.0
func (t *ProgressTracker) ProgressUpdate(delta int)
Update can be used to increase or decrease (for negative delta) the progress counter.
type Server ¶ added in v0.17.0
type Server struct { *cdsserver.Server *ProgressTracker // contains filtered or unexported fields }
func (*Server) GetConfigUpdateChannel ¶ added in v0.17.0
GetConfigUpdateChannel returns the channel on which the config discovery server listenens to update resuests.
func (*Server) ProcessUpdate ¶ added in v0.17.0
func (c *Server) ProcessUpdate(e *event.EventUpdate) error
ProcessUpdate processes new config events and updates the server with the current state-of-the-world.