controller

package
v0.0.0-...-8ccf8f9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Copyright IBM Corporation 2021.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindPort

func FindPort(pod *api.Pod, svcPort *api.ServicePort) (int32, error)

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.

Types

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) (*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 shutdowns the load balancer controller

type StoreToConfigMapLister

type StoreToConfigMapLister struct {
	cache.Store
}

StoreToConfigMapLister makes a Store that lists ConfigMaps

func (*StoreToConfigMapLister) List

func (s *StoreToConfigMapLister) List() (cfgm api.ConfigMapList, err error)

List lists all ConfigMap' in the store.

type StoreToEndpointLister

type StoreToEndpointLister struct {
	cache.Store
}

StoreToEndpointLister makes a Store that lists Endpoints

func (*StoreToEndpointLister) GetServiceEndpoints

func (s *StoreToEndpointLister) GetServiceEndpoints(svc *api.Service) (ep api.Endpoints, err error)

GetServiceEndpoints returns the endpoints of a service, matched on service name.

type StoreToIngressLister

type StoreToIngressLister struct {
	cache.Store
}

StoreToIngressLister makes a Store that lists Ingress.

func (*StoreToIngressLister) GetServiceIngress

func (s *StoreToIngressLister) GetServiceIngress(svc *api.Service) (ings []networking.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 networking.IngressList, err error)

List lists all Ingress' in the store.

type StoreToPodLister

type StoreToPodLister struct {
	cache.Store
}

StoreToPodLister makes a Store that lists Pods.

type StoreToSecretLister

type StoreToSecretLister struct {
	cache.Store
}

StoreToSecretLister makes a Store that lists Secrets

type StoreToServiceLister

type StoreToServiceLister struct {
	cache.Store
}

StoreToServiceLister makes a Store that lists Services

Jump to

Keyboard shortcuts

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