operator

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultContourImage           = "ghcr.io/projectcontour/contour:v1.24.0"
	DefaultEnvoyImage             = "docker.io/envoyproxy/envoy:v1.25.0"
	DefaultMetricsAddr            = ":8080"
	DefaultEnableLeaderElection   = false
	DefaultEnableLeaderElectionID = "0d879e31.projectcontour.io"
)

Variables

This section is empty.

Functions

func GetOperatorScheme

func GetOperatorScheme() *runtime.Scheme

GetOperatorScheme returns a scheme with types supported by the operator.

Types

type Client added in v1.15.0

type Client struct {
	client.Client
	meta.RESTMapper
}

Clients holds the API clients required by Operator.

type Config added in v1.21.0

type Config struct {
	// ContourImage is the container image for the Contour container(s) managed
	// by the operator.
	ContourImage string

	// EnvoyImage is the container image for the Envoy container(s) managed
	// by the operator.
	EnvoyImage string

	// MetricsBindAddress is the TCP address that the operator should bind to for
	// serving prometheus metrics. It can be set to "0" to disable the metrics serving.
	MetricsBindAddress string

	// LeaderElection determines whether or not to use leader election when starting
	// the operator.
	LeaderElection bool

	// LeaderElectionID determines the name of the configmap that leader election will
	// use for holding the leader lock.
	LeaderElectionID string
}

Config is configuration of the operator.

func DefaultConfig added in v1.21.0

func DefaultConfig() *Config

DefaultConfig returns an operator config using default values.

type Operator

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

Operator is the scaffolding for the contour operator. It sets up dependencies and defines the topology of the operator and its managed components, wiring them together. Operator knows what specific resource types should produce operator events.

func New

func New(cliCfg *rest.Config, operatorConfig *Config) (*Operator, error)

New creates a new operator from cliCfg and operatorConfig.

func (*Operator) Start

func (o *Operator) Start(ctx context.Context) error

Start creates Gateway API controllers (if configured) and starts the operator synchronously until a message is received from ctx.

Jump to

Keyboard shortcuts

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