daemon

package
v3.2.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotReady = errors.New("datastore is not ready or has not been initialised")
)
View Source
var ErrServiceNotReady = errors.New("Kubernetes service missing IP or port.")

Functions

func Run

func Run(configFile string)

Run is the entry point to run a Felix instance.

Its main role is to sequence Felix's startup by:

Initialising early logging config (log format and early debug settings).

Parsing command line parameters.

Loading datastore configuration from the environment or config file.

Loading more configuration from the datastore (this is retried until success).

Starting the configured internal (golang) or external dataplane driver.

Starting the background processing goroutines, which load and keep in sync with the state from the datastore, the "calculation graph".

Starting the usage reporting and prometheus metrics endpoint threads (if configured).

Then, it defers to monitorAndManageShutdown(), which blocks until one of the components fails, then attempts a graceful shutdown. At that point, all the processing is in background goroutines.

To avoid having to maintain rarely-used code paths, Felix handles updates to its main config parameters by exiting and allowing itself to be restarted by the init daemon.

Types

type DataplaneConnector

type DataplaneConnector struct {
	ToDataplane                chan interface{}
	StatusUpdatesFromDataplane chan interface{}
	InSync                     chan bool
	// contains filtered or unexported fields
}

func (*DataplaneConnector) Start

func (fc *DataplaneConnector) Start()

type Startable

type Startable interface {
	Start()
}

Jump to

Keyboard shortcuts

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