Documentation ¶
Index ¶
- func FindPort(pod *api_v1.Pod, svcPort *api_v1.ServicePort) (int32, error)
- func NewListWatchFromClient(c cache.Getter, resource string, namespace string, ...) *cache.ListWatch
- type Configurator
- type EndpointsAccessor
- type IngressAccessor
- type LoadBalancerController
- type SecretAccessor
- type StoreToConfigMapLister
- type StoreToEndpointLister
- type StoreToIngressLister
- type TaskQueue
- type Watchlist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configurator ¶
type Configurator interface { ConfigUpdated(cfgm *api_v1.ConfigMap) error IngressDeleted(ingKey string) error IngressUpdated(ingKey string) error }
Configurator converts ingress objects into nginx config
func NewConfigurator ¶
func NewConfigurator( ingressAccessor IngressAccessor, secretAccessor SecretAccessor, endpointsAccessor EndpointsAccessor, secretWatchlist Watchlist, recorder record.EventRecorder, mcs storage.MainConfigStorage, scs storage.ServerConfigStorage, ) Configurator
NewConfigurator creates a new Configurator instance
type EndpointsAccessor ¶
type EndpointsAccessor interface {
GetEndpointsForIngressBackend(backend *extensions.IngressBackend, namespace string) ([]string, error)
}
EndpointsAccessor contains methods to access k8s service endpoints
type IngressAccessor ¶
type IngressAccessor interface {
GetByKey(key string) (*extensions.Ingress, error)
}
IngressAccessor contains methods to access k8s ingress objects
type LoadBalancerController ¶
type LoadBalancerController struct {
// contains filtered or unexported fields
}
LoadBalancerController watches Kubernetes API and reconfigures NGINX via Controller when needed
func NewLoadBalancerController ¶
func NewLoadBalancerController( kubeClient kubernetes.Interface, resyncPeriod time.Duration, namespace string, selector labels.Selector, nginxConfigMaps string, mcs storage.MainConfigStorage, scs storage.ServerConfigStorage, ) (*LoadBalancerController, error)
NewLoadBalancerController creates a controller
func (*LoadBalancerController) Run ¶
func (lbc *LoadBalancerController) Run()
Run starts the loadbalancer controller
func (*LoadBalancerController) Stop ¶
func (lbc *LoadBalancerController) Stop()
Stop stops the loadbalancer controller
type SecretAccessor ¶
SecretAccessor contains methods to access k8s secrets
type StoreToConfigMapLister ¶
StoreToConfigMapLister makes a Store that lists ConfigMaps
func (*StoreToConfigMapLister) List ¶
func (s *StoreToConfigMapLister) List() (cfgm api_v1.ConfigMapList, err error)
List lists all Ingress' in the store.
type StoreToEndpointLister ¶
StoreToEndpointLister makes a Store that lists Endponts
func (*StoreToEndpointLister) GetServiceEndpoints ¶
func (s *StoreToEndpointLister) GetServiceEndpoints(svc *api_v1.Service) (ep api_v1.Endpoints, err error)
GetServiceEndpoints returns the endpoints of a service, matched on service name.
type StoreToIngressLister ¶
StoreToIngressLister makes a Store that lists Ingress. TODO: Move this to cache/listers post 1.1.
func (*StoreToIngressLister) GetServiceIngress ¶
func (s *StoreToIngressLister) GetServiceIngress(svc *api_v1.Service) (ings []extensions.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 extensions.IngressList, err error)
List lists all Ingress' in the store.
type TaskQueue ¶
type TaskQueue interface { Run(period time.Duration, stopCh <-chan struct{}) // Enqueue enqueues ns/name of the given api object in the task queue. Enqueue(obj interface{}) EnqueueKey(key string) Requeue(key string, err error) RequeueAfter(key string, err error, after time.Duration) // Shutdown shuts down the work queue and waits for the worker to ACK Shutdown() }
TaskQueue manages a work queue through an independent worker that invokes the given sync function for every work item inserted.