controllers

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkflowWorkerAddrIndex             = ".status.tasks.workerAddr"
	WorkflowWorkerNonTerminalStateIndex = ".status.state.nonTerminalWorker"
	WorkflowStateIndex                  = ".status.state"
	HardwareMACAddrIndex                = ".spec.interfaces.dhcp.mac"
	HardwareIPAddrIndex                 = ".spec.interfaces.dhcp.ip"
)

Variables

This section is empty.

Functions

func GetControllerOptions

func GetControllerOptions() controllerruntime.Options

GetControllerOptions returns a set of options used by the Tink controller. These options include leader election enabled.

func GetNamespacedControllerOptions

func GetNamespacedControllerOptions(namespace string) controllerruntime.Options

GetNamespacedControllerOptions returns a set of options used by the Tink controller. These options include leader election enabled.

func GetServerOptions

func GetServerOptions() controllerruntime.Options

GetServerOptions returns a set of options used by the Tink API. These options include leader election disabled.

func HardwareIPIndexFunc

func HardwareIPIndexFunc(obj client.Object) []string

HardwareIPIndexFunc returns a list of IP addresses from a hardware.

func HardwareMacIndexFunc

func HardwareMacIndexFunc(obj client.Object) []string

HardwareMacIndexFunc returns a list of mac addresses from a hardware.

func RetryIfError

func RetryIfError(ctx context.Context, err error) (reconcile.Result, error)

RetryIfError logs any errors and requeues if not nil. Supports multierr unwrapping.

func WorkflowStateIndexFunc

func WorkflowStateIndexFunc(obj client.Object) []string

WorkflowStateIndexFunc func returns the workflow state.

func WorkflowWorkerAddrIndexFunc

func WorkflowWorkerAddrIndexFunc(obj client.Object) []string

WorkflowWorkerAddrIndexFunc func returns a list of worker addresses from a workflow.

func WorkflowWorkerNonTerminalStateIndexFunc

func WorkflowWorkerNonTerminalStateIndexFunc(obj client.Object) []string

WorkflowWorkerNonTerminalStateIndexFunc func returns a list of worker addresses for workflows in a running or pending state.

Types

type Controller

type Controller interface {
	// Reconcile hands a hydrated kubernetes resource to the controller for
	// reconciliation. Any changes made to the resource's status are persisted
	// after Reconcile returns, even if it returns an error.
	reconcile.Reconciler

	// Register will register the controller with the manager
	Register(context.Context, manager.Manager) error
}

Controller is an interface implemented by Karpenter custom resources.

type GenericControllerManager

type GenericControllerManager struct {
	manager.Manager
}

GenericControllerManager is a manager.Manager that allows for registering of controllers.

func (*GenericControllerManager) RegisterControllers

func (m *GenericControllerManager) RegisterControllers(ctx context.Context, controllers ...Controller) Manager

RegisterControllers registers a set of controllers to the controller manager.

type Manager

type Manager interface {
	manager.Manager
	RegisterControllers(context.Context, ...Controller) Manager
}

Manager manages a set of controllers and webhooks.

func NewManager

func NewManager(config *rest.Config, options controllerruntime.Options) (Manager, error)

NewManager instantiates a controller manager.

func NewManagerOrDie

func NewManagerOrDie(config *rest.Config, options controllerruntime.Options) Manager

NewManagerOrDie instantiates a controller manager.

type Options

type Options struct {
	MetricsPort     int
	HealthProbePort int
}

Options for running this binary.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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