manager

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package manager builds the controller-runtime manager that hosts the operator's controllers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *rest.Config, o Options, scheme *runtime.Scheme, cacheOptions cache.Options) (ctrlmanager.Manager, error)

New builds a manager with health and readiness checks registered. The controllers supply cacheOptions, which scope informers to their RBAC.

func NewScheme

func NewScheme() (*runtime.Scheme, error)

NewScheme returns the scheme with every type the operator reads or writes.

Types

type Flags

type Flags struct {
	Options Options
	Config  config.Config
}

Flags holds the operator's command-line settings, for the manager process and the installation.

func ParseFlags

func ParseFlags(fs *flag.FlagSet, args []string) (Flags, error)

ParseFlags parses args on fs over the defaults. fs may hold other flags, such as --version.

type Options

type Options struct {
	MetricsBindAddress      string
	HealthProbeBindAddress  string
	LeaderElection          bool
	LeaderElectionNamespace string
	GracefulShutdownTimeout time.Duration
	LogLevel                slog.Level
}

Options configures the manager process.

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns the options used when no flag overrides them. Leader election is on: a second replica must never act as leader.

func (*Options) BindFlags

func (o *Options) BindFlags(fs *flag.FlagSet)

BindFlags registers the options on fs, using the current values as defaults.

func (Options) String

func (o Options) String() string

String renders options for the startup log.

func (Options) Validate

func (o Options) Validate() error

Validate rejects options that would leave the process unbounded or unobservable.

Jump to

Keyboard shortcuts

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