controller

package
v0.0.0-...-7669b99 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2017 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespaceIndex string = "namespace"
)

Variables

View Source
var (

	// DefaultClusterUID is the uid to use for clusters resources created by an
	// L7 controller created without specifying the --cluster-uid flag.
	DefaultClusterUID = ""
)

Functions

func ListAll

func ListAll(store cache.Store, selector labels.Selector, appendFn AppendFunc) error

func ListAllByNamespace

func ListAllByNamespace(indexer cache.Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error

func NewTaskQueue

func NewTaskQueue(syncFn func(string) error) *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 AppendFunc

type AppendFunc func(interface{})

AppendFunc is used to add a matching item to whatever list the caller is using

type LoadBalancerController

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

func NewLoadBalancerController

func NewLoadBalancerController(aliyunClient *client.AliyunClient, clientset *kubernetes.Clientset, loadBalancerName, loadBalancerID, loadBalancerIP string) *LoadBalancerController

func (*LoadBalancerController) Run

func (lbc *LoadBalancerController) Run(stopCh <-chan struct{})

type NodeConditionPredicate

type NodeConditionPredicate func(node *v1.Node) bool

NodeConditionPredicate is a function that indicates whether the given node's conditions meet some set of criteria defined by the function.

type Rule

type Rule map[string]slb.Rule

sets.Rule is a set of slb.Rule, implemented via map[slb.Rule]struct{} for minimal memory consumption.

func NewRule

func NewRule(items ...slb.Rule) Rule

New creates a Rule from a list of values.

func RuleKeySet

func RuleKeySet(theMap interface{}) Rule

RuleKeySet creates a Rule from a keys of a map[string](? extends interface{}). If the value passed in is not actually a map, this will panic.

func (Rule) Delete

func (s Rule) Delete(items ...slb.Rule)

Delete removes all items from the set.

func (Rule) Difference

func (s Rule) Difference(s2 Rule) Rule

Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}

func (Rule) Equal

func (s1 Rule) Equal(s2 Rule) bool

Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)

func (Rule) Has

func (s Rule) Has(item slb.Rule) bool

Has returns true if and only if item is contained in the set.

func (Rule) HasAll

func (s Rule) HasAll(items ...slb.Rule) bool

HasAll returns true if and only if all items are contained in the set.

func (Rule) HasAny

func (s Rule) HasAny(items ...slb.Rule) bool

HasAny returns true if any items are contained in the set.

func (Rule) Insert

func (s Rule) Insert(items ...slb.Rule)

Insert adds items to the set.

func (Rule) Intersection

func (s1 Rule) Intersection(s2 Rule) Rule

Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}

func (Rule) IsSuperset

func (s1 Rule) IsSuperset(s2 Rule) bool

IsSuperset returns true if and only if s1 is a superset of s2.

func (Rule) Len

func (s Rule) Len() int

Len returns the size of the set.

func (Rule) List

func (s Rule) List() []slb.Rule

List returns the contents as a sorted string slice.

func (Rule) PopAny

func (s Rule) PopAny() (slb.Rule, bool)

Returns a single element from the set.

func (Rule) Union

func (s1 Rule) Union(s2 Rule) Rule

Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}

func (Rule) UnsortedList

func (s Rule) UnsortedList() []slb.Rule

UnsortedList returns the slice with contents in random order.

type StoreToIngressLister

type StoreToIngressLister struct {
	cache.Store
}

func (*StoreToIngressLister) GetServiceIngress

func (s *StoreToIngressLister) GetServiceIngress(svc *v1.Service) (ings []v1beta1.Ingress, err error)

GetServiceIngress gets all the Ingress' that have rules pointing to a service. Note that this ignores services without the right nodePorts.

func (*StoreToIngressLister) List

func (s *StoreToIngressLister) List() (ing v1beta1.IngressList, err error)

List lists all Ingress' in the store.

type StoreToNodeLister

type StoreToNodeLister struct {
	cache.Store
}

StoreToNodeLister makes a Store have the List method of the client.NodeInterface The Store must contain (only) Nodes.

func (*StoreToNodeLister) List

func (s *StoreToNodeLister) List() (machines v1.NodeList, err error)

func (*StoreToNodeLister) NodeCondition

func (s *StoreToNodeLister) NodeCondition(predicate NodeConditionPredicate) storeToNodeConditionLister

NodeCondition returns a storeToNodeConditionLister

type StoreToPodLister

type StoreToPodLister struct {
	Indexer cache.Indexer
}

StoreToPodLister helps list pods

func (*StoreToPodLister) List

func (s *StoreToPodLister) List(selector labels.Selector) (ret []*v1.Pod, err error)

func (*StoreToPodLister) Pods

func (s *StoreToPodLister) Pods(namespace string) storePodsNamespacer

type StoreToServiceLister

type StoreToServiceLister struct {
	Indexer cache.Indexer
}

StoreToServiceLister helps list services

func (*StoreToServiceLister) GetPodServices

func (s *StoreToServiceLister) GetPodServices(pod *v1.Pod) (services []*v1.Service, err error)

TODO: Move this back to scheduler as a helper function that takes a Store, rather than a method of StoreToServiceLister.

func (*StoreToServiceLister) List

func (s *StoreToServiceLister) List(selector labels.Selector) (ret []*v1.Service, err error)

func (*StoreToServiceLister) Services

func (s *StoreToServiceLister) Services(namespace string) storeServicesNamespacer

Jump to

Keyboard shortcuts

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