Documentation
¶
Index ¶
- Constants
- func AvailableNodes(svc *v1.Service, ifactory informers.SharedInformerFactory) ([]*v1.Node, error)
- func Enqueue(queue queue.DelayingInterface, k interface{})
- func HandlerForEndpointChange(context *Context, que queue.DelayingInterface, ...)
- func HandlerForNodesChange(ctx *Context, que queue.DelayingInterface, informer cache.SharedIndexInformer)
- func HandlerForServiceChange(context *Context, que queue.DelayingInterface, ...)
- 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, ifactory informers.SharedInformerFactory) (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
- 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" BACKEND_TYPE_LABEL = "service.beta.kubernetes.io/backend-type" )
View Source
const ( BACKEND_TYPE_ENI = "eni" BACKEND_TYPE_ECS = "ecs" )
Variables ¶
This section is empty.
Functions ¶
func AvailableNodes ¶
func AvailableNodes( svc *v1.Service, ifactory informers.SharedInformerFactory, ) ([]*v1.Node, error)
func Enqueue ¶
func Enqueue(queue queue.DelayingInterface, k interface{})
func HandlerForEndpointChange ¶
func HandlerForEndpointChange( context *Context, que queue.DelayingInterface, informer cache.SharedIndexInformer, )
func HandlerForNodesChange ¶
func HandlerForNodesChange( ctx *Context, que queue.DelayingInterface, informer cache.SharedIndexInformer, )
func HandlerForServiceChange ¶
func HandlerForServiceChange( context *Context, que queue.DelayingInterface, informer cache.SharedIndexInformer, record record.EventRecorder, )
func IsENIBackendType ¶
func IsENIBackendType(svc *v1.Service) bool
func NeedLoadBalancer ¶
func NeedLoadBalancer(service *v1.Service) bool
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, ifactory informers.SharedInformerFactory, ) (corelisters.NodeConditionPredicate, error)
func NodeLabelsChanged ¶
func NodeSpecChanged ¶
func NodeSpecChanged(a, b *v1.Node) bool
func ServiceModeLocal ¶
func ServiceModeLocal(svc *v1.Service) bool
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) 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.