ingress

package
v0.0.0-...-d0c0f99 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2017 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExporterSidecarTag = "appscode/voyager:3.1.0"
)

Variables

This section is empty.

Functions

func Context

func Context(s interface{}) (pongo2.Context, error)

func VolumeMounts

func VolumeMounts(secretNames []string) []apiv1.VolumeMount

func Volumes

func Volumes(secretNames []string) []apiv1.Volume

Types

type Backend

type Backend struct {
	Name         string   `json:"Name,omitempty"`
	BackendRules []string `json:"BackendRules,omitempty"`
	// Deprecated
	RewriteRules []string `json:"RewriteRules,omitempty"`
	// Deprecated
	HeaderRules []string    `json:"HeaderRules,omitempty"`
	Endpoints   []*Endpoint `json:"Endpoints,omitempty"`
}

type Controller

type Controller struct {
	KubeClient clientset.Interface
	ExtClient  acs.ExtensionInterface
	PromClient pcm.MonitoringV1alpha1Interface

	Opt config.Options

	// Engress object that created or updated.
	Ingress *api.Ingress
	// kube options data
	SecretNames []string
	// contains raw configMap data parsed from the cfg file.
	ConfigData string

	// Ports contains a map of Service Port to HAProxy port (svc.Port -> svc.TargetPort).
	// HAProxy pods binds to the target ports. Service ports are used to open loadbalancer/firewall.
	// Usually target port == service port with one exception for LoadBalancer type service in AWS.
	// If AWS cert manager is used then a 443 -> 80 port mapping is added.
	Ports map[int]int
	// contains all the https host names.
	HostFilter []string
	// parsed ingress.
	Parsed HAProxyOptions

	// kubernetes client
	CloudManager cloudprovider.Interface
	sync.Mutex
	// contains filtered or unexported fields
}

func NewController

func NewController(
	kubeClient clientset.Interface,
	extClient acs.ExtensionInterface,
	promClient pcm.MonitoringV1alpha1Interface,
	opt config.Options,
	ingress *api.Ingress) *Controller

func (*Controller) Create

func (lbc *Controller) Create() error

func (*Controller) Delete

func (lbc *Controller) Delete() error

func (*Controller) IsExists

func (lbc *Controller) IsExists() bool

func (*Controller) SupportsLBType

func (lbc *Controller) SupportsLBType() bool

func (*Controller) Update

func (lbc *Controller) Update(mode UpdateMode) error

func (*Controller) UpdateTargetAnnotations

func (lbc *Controller) UpdateTargetAnnotations(old *api.Ingress, new *api.Ingress) error

type Endpoint

type Endpoint struct {
	Name           string
	IP             string
	Port           string
	Weight         int
	ExternalName   string
	UseDNSResolver bool
	DNSResolver    string
	CheckHealth    bool
}

type HAProxyOptions

type HAProxyOptions struct {
	Timestamp int64

	// stick requests to specified servers.
	Sticky  bool
	SSLCert bool

	TimeoutDefaults map[string]string

	// open up load balancer stats
	Stats bool
	// Basic auth to lb stats
	StatsUserName string
	StatsPassWord string
	StatsPort     int

	// Add accept-proxy to bind statements
	AcceptProxy bool

	DefaultBackend *Backend
	HttpsService   []*Service
	HttpService    []*Service
	TCPService     []*TCPService
	DNSResolvers   map[string]*api.DNSResolver
}

type Service

type Service struct {
	Name     string
	AclMatch string
	Host     string
	Backends *Backend
}

type TCPService

type TCPService struct {
	Name        string
	Host        string
	Port        string
	SecretName  string
	PEMName     string
	Backends    *Backend
	ALPNOptions string
}

type UpdateMode

type UpdateMode int
const (
	UpdateConfig   UpdateMode = 1 << iota // only reset haproxy config
	RestartHAProxy                        // secret changes, ports unchanged
	UpdateFirewall                        // ports changed
	UpdateStats                           // Update things for stats update
	UpdateRBAC                            // Update RBAC Roles as stats secret name is changes
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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