unidling

package
v0.0.0-...-18c0211 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GracePeriodDuration = 30 * time.Second
	IdledAtSuffix       = "/idled-at"
	UnidledAtSuffix     = "/unidled-at"
	UnidledAtAnnotation = "k8s.ovn.org" + UnidledAtSuffix
)

Variables

This section is empty.

Functions

func HasIdleAt

func HasIdleAt(svc *kapi.Service) bool

HasIdleAt returns true if the service annotation map contains a key like "*/idled-at"

func IsOnGracePeriod

func IsOnGracePeriod(svc *kapi.Service) bool

IsOnGracePeriod return true if the service has been unidled less than 30s (grace period) ago.

func NewController

func NewController(recorder record.EventRecorder, serviceInformer cache.SharedIndexInformer, sbClient libovsdbclient.Client) (*unidlingController, error)

NewController creates a new unidling controller

func NewUnidledAtController

func NewUnidledAtController(k kube.Interface, serviceInformer cache.SharedIndexInformer) (*unidledAtController, error)

NewUnidledAtController installs a controller on the passed informer. Whenever a service annotation like "*/idled-at" is removed from a service, it sets "k8s.ovn.org/unidled-at" with the current time, indicating the point in time the service has been unidled.

Types

type ServiceVIPKey

type ServiceVIPKey struct {
	// contains filtered or unexported fields
}

ServiceVIPKey is used for looking up service namespace information for a particular load balancer

Jump to

Keyboard shortcuts

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