controller

package
v0.0.0-...-336e61a Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidClass

func IsValidClass(ing *extensions.Ingress, class string) bool

IsValidClass returns true if the given Ingress either doesn't specify the ingress.class annotation, or it's set to the configured in the ingress controller.

Types

type Configuration

type Configuration struct {
	Client         *client.Client
	ElectionClient *clientset.Clientset

	ResyncPeriod   time.Duration
	DefaultService string
	IngressClass   string
	Namespace      string
	ConfigMapName  string
	// optional
	TCPConfigMapName string
	// optional
	UDPConfigMapName      string
	DefaultSSLCertificate string
	DefaultHealthzURL     string
	// optional
	PublishService string

	Backend ingress.Controller
}

Configuration contains all the settings required by an Ingress controller

type GenericController

type GenericController struct {
	healthz.HealthzChecker
	// contains filtered or unexported fields
}

GenericController watches the kubernetes api and adds/removes services from the loadbalancer

func (GenericController) Check

func (ic GenericController) Check(_ *http.Request) error

Check returns if the nginx healthz endpoint is returning ok (status code 200)

func (GenericController) Info

func (ic GenericController) Info() string

Info returns information about the backend

func (GenericController) IngressClass

func (ic GenericController) IngressClass() string

IngressClass returns information about the backend

func (GenericController) Name

func (ic GenericController) Name() string

Name returns the healthcheck name

func (GenericController) Start

func (ic GenericController) Start()

Start starts the Ingress controller.

func (GenericController) Stop

func (ic GenericController) Stop() error

Stop stops the loadbalancer controller.

type Interface

type Interface interface {
	Start()
	Stop() error

	Info() string

	healthz.HealthzChecker
}

Interface holds the methods to handle an Ingress backend

func NewIngressController

func NewIngressController(backend ingress.Controller) Interface

NewIngressController returns a configured Ingress controller ready to start

Jump to

Keyboard shortcuts

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