Documentation ¶
Index ¶
- Constants
- func FindPort(pod *api_v1.Pod, svcPort *api_v1.ServicePort) (int32, error)
- func NewTaskQueue(syncFn func(Task)) *taskQueue
- func ParseNamespaceName(value string) (ns string, name string, err error)
- type Kind
- type LoadBalancerController
- type StoreToConfigMapLister
- type StoreToEndpointLister
- type StoreToIngressLister
- type StoreToSecretLister
- type Task
Constants ¶
const ( // Ingress resource Ingress = iota // Endpoints resource Endpoints // ConfigMap resource ConfigMap // Secret resource Secret )
Variables ¶
This section is empty.
Functions ¶
func FindPort ¶ added in v0.9.0
FindPort locates the container port for the given pod and portName. If the targetPort is a number, use that. If the targetPort is a string, look that string up in all named ports in all containers in the target pod. If no match is found, fail.
func NewTaskQueue ¶
func NewTaskQueue(syncFn func(Task)) *taskQueue
NewTaskQueue creates a new task queue with the given sync function. The sync function is called for every element inserted into the queue.
func ParseNamespaceName ¶ added in v1.0.0
ParseNamespaceName parses the string in the <namespace>/<name> format and returns the name and the namespace. It returns an error in case the string does not follow the <namespace>/<name> format.
Types ¶
type Kind ¶ added in v1.0.0
type Kind int
Kind represnts the kind of the Kubernetes resources of a task
type LoadBalancerController ¶
type LoadBalancerController struct {
// contains filtered or unexported fields
}
LoadBalancerController watches Kubernetes API and reconfigures NGINX via NginxController when needed
func NewLoadBalancerController ¶
func NewLoadBalancerController(kubeClient kubernetes.Interface, resyncPeriod time.Duration, namespace string, cnf *nginx.Configurator, nginxConfigMaps string, defaultServerSecret string, nginxPlus bool, ingressClass string, useIngressClassOnly bool) (*LoadBalancerController, error)
NewLoadBalancerController creates a controller
func (*LoadBalancerController) Run ¶
func (lbc *LoadBalancerController) Run()
Run starts the loadbalancer controller
func (*LoadBalancerController) Stop ¶ added in v1.0.0
func (lbc *LoadBalancerController) Stop()
Stop shutdowns the load balancer controller
func (*LoadBalancerController) ValidateSecret ¶ added in v1.0.0
func (lbc *LoadBalancerController) ValidateSecret(secret *api_v1.Secret) error
ValidateSecret validates that the secret follows the TLS Secret format. For NGINX Plus, it also checks if the secret follows the JWK Secret format.
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 ¶ added in v0.9.0
StoreToEndpointLister makes a Store that lists Endponts
func (*StoreToEndpointLister) GetServiceEndpoints ¶ added in v0.9.0
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 StoreToSecretLister ¶ added in v1.0.0
StoreToSecretLister makes a Store that lists Secrets