translator

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendInfo

type BackendInfo interface {
	BackendServiceForPort(port int64) (*compute.BackendService, error)
	DefaultBackendNodePort() *backends.ServicePort
}

BackendInfo is an interface to return information about the backends.

type GCE

type GCE struct {
	// contains filtered or unexported fields
}

GCE helps with kubernetes -> gce api conversion.

func New

func New(recorders recorderSource, bi BackendInfo, svcLister cache.Indexer, nodeLister cache.Indexer, podLister cache.Indexer, endpointLister cache.Indexer, negEnabled bool) *GCE

New returns a new ControllerContext.

func (*GCE) GatherEndpointPorts

func (t *GCE) GatherEndpointPorts(svcPorts []backends.ServicePort) []string

GatherEndpointPorts returns all ports needed to open NEG endpoints.

func (*GCE) GetProbe

func (t *GCE) GetProbe(port backends.ServicePort) (*api_v1.Probe, error)

GetProbe returns a probe that's used for the given nodeport

func (*GCE) GetZoneForNode

func (t *GCE) GetZoneForNode(name string) (string, error)

GetZoneForNode returns the zone for a given node by looking up its zone label.

func (*GCE) IngressToNodePorts added in v1.1.0

func (t *GCE) IngressToNodePorts(ing *extensions.Ingress) []backends.ServicePort

IngressToNodePorts converts a pathlist to a flat list of nodeports for the given ingress.

func (*GCE) ListZones

func (t *GCE) ListZones() ([]string, error)

ListZones returns a list of zones this Kubernetes cluster spans.

func (*GCE) ToNodePorts

func (t *GCE) ToNodePorts(ings *extensions.IngressList) []backends.ServicePort

ToNodePorts is a helper method over IngressToNodePorts to process a list of ingresses.

func (*GCE) ToURLMap

func (t *GCE) ToURLMap(ing *extensions.Ingress) (utils.GCEURLMap, error)

ToURLMap converts an ingress to a map of subdomain: url-regex: gce backend.

Jump to

Keyboard shortcuts

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