Documentation ¶
Index ¶
- Constants
- func HasIdleAt(svc *kapi.Service) bool
- func IsOnGracePeriod(svc *kapi.Service) bool
- func NewController(recorder record.EventRecorder, serviceInformer cache.SharedIndexInformer, ...) (*unidlingController, error)
- func NewUnidledAtController(k kube.Interface, serviceInformer cache.SharedIndexInformer) (*unidledAtController, error)
- type ServiceVIPKey
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 ¶
HasIdleAt returns true if the service annotation map contains a key like "*/idled-at"
func IsOnGracePeriod ¶
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
Click to show internal directories.
Click to hide internal directories.