bootstrap

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(
	ctx context.Context,
	schemes runtime.SchemeBuilder,
	opts *Options,
	startFunc StartFunc,
) error

Start a custom controller with given parameters

Types

type Options

type Options struct {
	// InCluster specifies whether the controller should use the in-cluster k8s client config.
	InCluster bool

	// KubeContext is the context name to use for the controller's k8s client.
	KubeContext string

	// KubeConfig specifies the explicit path of the controller's k8s client config.
	KubeConfig string

	// MetricsAddr is the bind address for the metrics endpoint
	MetricsAddr string
	// HealthAddr is the bind address for the healthcheck endpoints
	HealthAddr string

	// enables verbose mode
	VerboseMode bool

	// enables dev logger (instead of prod logger)
	// NOTE: DO NOT set this to true in prod, it will crash on DPanic
	DevLogger bool

	// Maximum QPS to the kube-apiserver from this client
	ClientQPS float32

	// Maximum burst for throttle
	ClientBurst int

	// SyncPeriod determines the minimum frequency at which controllers will perform a reconciliation.
	// This is a global setting that applies to all controllers. Defaults to 10 hours.
	// Issue tracking sync periods per controller: https://github.com/reddit/achilles-sdk/issues/171
	SyncPeriod time.Duration
}

Options for starting a custom controller

func (*Options) AddToFlags

func (o *Options) AddToFlags(flags *pflag.FlagSet)

type StartFunc

type StartFunc func(
	ctx context.Context,
	mgr manager.Manager,
) error

StartFunc is a function for starting a controller manager

Jump to

Keyboard shortcuts

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