Documentation ¶
Index ¶
- Constants
- func AvailableNodeModeLocal(nodes []*v1.Node, svc *v1.Service, ifactory informers.SharedInformerFactory) ([]*v1.Node, error)
- func AvailableNodes(svc *v1.Service, ifactory informers.SharedInformerFactory) ([]*v1.Node, error)
- func Enqueue(queue queue.DelayingInterface, k interface{})
- func IsENIBackendType(svc *v1.Service) bool
- func NeedLoadBalancer(service *v1.Service) bool
- func NeedUpdate(old, newm *v1.Service, record record.EventRecorder) bool
- func NodeConditionChanged(a, b []v1.NodeCondition) bool
- func NodeConditionPredicate(svc *v1.Service) (corelisters.NodeConditionPredicate, error)
- func NodeLabelsChanged(a, b map[string]string) bool
- func NodeSpecChanged(a, b *v1.Node) bool
- func ServiceModeLocal(svc *v1.Service) bool
- func WorkerFunc(contex *Context, queue queue.DelayingInterface, syncd SyncTask) func()
- type Context
- type Controller
- func (con *Controller) HandlerForEndpointChange(context *Context, que queue.DelayingInterface, ...)
- func (con *Controller) HandlerForNodesChange(ctx *Context, que queue.DelayingInterface, informer cache.SharedIndexInformer)
- func (con *Controller) HandlerForServiceChange(context *Context, que queue.DelayingInterface, ...)
- func (con *Controller) NodeSyncTask(k string) error
- func (con *Controller) Run(stopCh <-chan struct{}, workers int)
- func (con *Controller) ServiceSyncTask(k string) error
- type EnsureENI
- type SyncTask
Constants ¶
View Source
const ( //SERVICE_SYNC_PERIOD Interval of synchronizing service status from apiserver SERVICE_SYNC_PERIOD = 1 * time.Minute SERVICE_QUEUE = "service-queue" NODE_QUEUE = "node-queue" SERVICE_CONTROLLER = "service-controller" LabelNodeRoleMaster = "node-role.kubernetes.io/master" // LabelNodeRoleExcludeBalancer specifies that the node should be // exclude from load balancers created by a cloud provider. LabelNodeRoleExcludeBalancer = "alpha.service-controller.kubernetes.io/exclude-balancer" CCM_CLASS = "service.beta.kubernetes.io/class" )
View Source
const TRY_AGAIN = "try again"
Variables ¶
This section is empty.
Functions ¶
func AvailableNodeModeLocal ¶
func AvailableNodes ¶
func Enqueue ¶
func Enqueue(queue queue.DelayingInterface, k interface{})
func IsENIBackendType ¶
func NeedLoadBalancer ¶
func NeedUpdate ¶
func NeedUpdate(old, newm *v1.Service, record record.EventRecorder) bool
NeedUpdate compare old and new service for possible changes
func NodeConditionChanged ¶
func NodeConditionChanged(a, b []v1.NodeCondition) bool
func NodeConditionPredicate ¶
func NodeConditionPredicate(svc *v1.Service) (corelisters.NodeConditionPredicate, error)
func NodeLabelsChanged ¶
func NodeSpecChanged ¶
func ServiceModeLocal ¶
func WorkerFunc ¶
func WorkerFunc( contex *Context, queue queue.DelayingInterface, syncd SyncTask, ) func()
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController( cloud cloudprovider.LoadBalancer, client clientset.Interface, ifactory informers.SharedInformerFactory, clusterName string, ) (*Controller, error)
func (*Controller) HandlerForEndpointChange ¶
func (con *Controller) HandlerForEndpointChange( context *Context, que queue.DelayingInterface, informer cache.SharedIndexInformer, )
func (*Controller) HandlerForNodesChange ¶
func (con *Controller) HandlerForNodesChange( ctx *Context, que queue.DelayingInterface, informer cache.SharedIndexInformer, )
func (*Controller) HandlerForServiceChange ¶
func (con *Controller) HandlerForServiceChange( context *Context, que queue.DelayingInterface, informer cache.SharedIndexInformer, record record.EventRecorder, )
func (*Controller) NodeSyncTask ¶
func (con *Controller) NodeSyncTask(k string) error
func (*Controller) Run ¶
func (con *Controller) Run(stopCh <-chan struct{}, workers int)
func (*Controller) ServiceSyncTask ¶
func (con *Controller) ServiceSyncTask(k string) error
SyncService Entrance for syncing service
type EnsureENI ¶
type EnsureENI interface { // EnsureLoadbalancerWithENI // creates a new load balancer 'name', or updates the existing one. Returns the // status of the balancer. Implementations must treat the *v1.svc and *v1.Endpoints // parameters as read-only and not modify them. // Parameter 'name' is the name of the cluster as presented to kube-controller-manager EnsureLoadBalancerWithENI(name string, svc *v1.Service, endpoint *v1.Endpoints) (*v1.LoadBalancerStatus, error) // UpdateLoadBalancerWithENI updates hosts under the specified load balancer. // Implementations must treat the *v1.Service and *v1.Enodpoints // parameters as read-only and not modify them. // Parameter 'name' is the name of the cluster as presented to kube-controller-manager UpdateLoadBalancerWithENI(name string, service *v1.Service, endpoint *v1.Endpoints) error }
Click to show internal directories.
Click to hide internal directories.