operator

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operator

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

Operator is the high level wrapper around a manager and the group of controllers that represents the primary functionality of pomerium-operator. Use NewOperator() to initialize.

Operator supports multiple Controller/Reconciler instances to allow for multiple object type recinciliation under a single controller-manager.

func NewOperator

func NewOperator(opts Options) (*Operator, error)

NewOperator returns a new instance of an Operator, configured according to an Options struct. The operator will have an initialized but empty Manager with no controllers.

You must call Start() on the returned Operator to begin event loops.

func (*Operator) Add

func (o *Operator) Add(f manager.Runnable) error

Add ensures a manager.Runnable is started with the rest of the operator

func (*Operator) CreateController

func (o *Operator) CreateController(reconciler reconcile.Reconciler, name string, object runtime.Object) error

CreateController registers a new Reconciler with the Operator and associates it with an object type to handle events for.

func (*Operator) Start

func (o *Operator) Start() error

Start calls Start() on the underlying controller-manager. This begins the event handling loops on the controllers associated with the Operator instance.

type Options

type Options struct {
	NameSpace               string
	ServiceClass            string
	IngressClass            string
	Secret                  string
	Client                  manager.NewClientFunc
	KubeConfig              *rest.Config
	MapperProvider          func(*rest.Config) (meta.RESTMapper, error)
	MetricsBindAddress      string
	HealthAddress           string
	LeaderElection          bool
	LeaderElectionID        string
	LeaderElectionNamespace string
	StopCh                  <-chan struct{}
}

Options represents the configuration of an Operator. Used in NewOperator()

Jump to

Keyboard shortcuts

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