ingress

package
v3.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller ensures that zero or more routes exist to match any supported ingress. The controller creates a controller owner reference from the route to the parent ingress, allowing users to orphan their ingress. All owned routes have specific spec fields managed (those attributes present on the ingress), while any other fields may be modified by the user.

Invariants:

  1. For every ingress path rule with a non-empty backend statement, a route should exist that points to that backend.
  2. For every TLS hostname that has a corresponding path rule and points to a secret that exists, a route should exist with a valid TLS config from that secret.
  3. For every service referenced by the ingress path rule, the route should have a target port based on the service.
  4. A route owned by an ingress that is not described by any of the three invariants above should be deleted.

The controller also relies on the use of expectations to remind itself whether there are route creations it has not yet observed, which prevents the controller from creating more objects than it needs. The expectations are reset when the ingress object is modified. It is possible that expectations could leak if an ingress is deleted and its deletion is not observed by the cache, but such leaks are only expected if there is a bug in the informer cache which must be fixed anyway.

Unsupported attributes:

* the ingress class attribute * nginx annotations * the empty backend * paths with empty backends * creating a dynamic route spec.host

func NewController

NewController instantiates a Controller

func (*Controller) Run

func (c *Controller) Run(workers int, stopCh <-chan struct{})

Run begins watching and syncing.

Jump to

Keyboard shortcuts

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