operatorbootstrap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancelled

func Cancelled() bool

func CustomSignalsHandler

func CustomSignalsHandler(additionalActionBeforeCancel func()) context.Context

func InstantiateConfiguration

func InstantiateConfiguration(cfg operatorconfig.OperatorConfig)

func MustSetupController

func MustSetupController(err error)

func NewManager

func NewManager(opts ctrl.Options, mgrFunc ManagerFunc) ctrl.Manager

Types

type Bootstrapper

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

func NewBootstrapper

func NewBootstrapper(mgr manager.Manager) *Bootstrapper

func (*Bootstrapper) GetMgr

func (b *Bootstrapper) GetMgr() manager.Manager

func (*Bootstrapper) Run

func (b *Bootstrapper) Run(ctx context.Context)

func (*Bootstrapper) WithControllers

func (b *Bootstrapper) WithControllers(controllers ...KubernetesOperator) *Bootstrapper

type KubernetesOperator

type KubernetesOperator interface {
	reconcile.Reconciler
	SetupWithManager(mgr ctrl.Manager) error
}

type ManagerFunc

type ManagerFunc func(mgr manager.Manager)
var (
	StartTime                           = time.Now()
	AddPodIndexersToManager ManagerFunc = func(mgr manager.Manager) {
		if err := mgr.GetFieldIndexer().IndexField(context.Background(), &v1.Pod{}, "spec.nodeName", func(o client.Object) []string {
			return []string{o.(*v1.Pod).Spec.NodeName}
		}); err != nil {
			panic(fmt.Sprintf("Failed to setup pod indexer, %s", err))
		}
	}
)

Jump to

Keyboard shortcuts

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