controllers

package
v0.0.0-...-ca7731e Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTaskQueue

func NewTaskQueue(syncFn func(string)) *taskQueue

NewTaskQueue creates a new task queue with the given sync function. The sync function is called for every element inserted into the queue.

Types

type IPManager

type IPManager struct {
	ConfigMapName string
	// contains filtered or unexported fields
}

IPManager is used to track which IPs have been allocated for loadbalancing services

func NewIPManager

func NewIPManager(kubeClient *unversioned.Client, ipCmNamespace, userNamespace, configLabelKey, configLabelValue string) *IPManager

NewIPManager creates an IPManager object that manage IPs allocated to services

func (*IPManager) DeleteVirtualIP

func (ipManager *IPManager) DeleteVirtualIP(name string) error

DeleteVirtualIP returns the allocated VIP for the configmap name to the available VIP pool

func (*IPManager) GenerateVirtualIP

func (ipManager *IPManager) GenerateVirtualIP(configMap *api.ConfigMap) (string, error)

GenerateVirtualIP gets a VIP for the configmap passed and allocates to be used for loadbalancer

type LoadBalancerController

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

LoadBalancerController watches Kubernetes API for ConfigMap and node changes and reconfigures backend when needed

func NewLoadBalancerController

func NewLoadBalancerController(kubeClient *client.Client, resyncPeriod time.Duration, namespace string, controller backend.BackendController, configMapLabelKey, configMapLabelValue string) (*LoadBalancerController, error)

NewLoadBalancerController creates a controller

func (*LoadBalancerController) Run

func (lbController *LoadBalancerController) Run()

Run starts the configmap controller

type StoreToConfigMapLister

type StoreToConfigMapLister struct {
	cache.Store
}

StoreToConfigMapLister makes a Store that lists ConfigMap.

Jump to

Keyboard shortcuts

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