controllers

package
v0.0.0-...-597cd30 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FinalizerForAWSResources = v1alpha1.SchemeGroupVersion.Group + "/%s"
)

Functions

This section is empty.

Types

type Controller

type Controller interface {
	// Name returns the name of controller for the resource (vpc, subnet) to
	// identify which controller is running and to add info to the logs.
	Name() string
	// 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(context.Context, Object) (*reconcile.Result, error)
	// Reconcile hands a hydrated kubernetes resource to the controller for
	// cleanup. Any changes made to the resource's status are persisted after
	// Finalize returns, even if it returns an error.
	Finalize(context.Context, Object) (*reconcile.Result, error)
	// For returns a default instantiation of the resource and is injected by
	// data from the API Server at the start of the reconciliation loop.
	For() Object
}

Controller is an interface implemented by AWS resources like VPC, Subnet, Security groups etc. required for a cluster creation

type GenericController

type GenericController struct {
	Controller
	client.Client
}

GenericController implements controllerruntime.Reconciler and runs a standardized reconciliation workflow against incoming resource watch events.

func (*GenericController) Reconcile

Reconcile executes a control loop for the resource

type GenericControllerManager

type GenericControllerManager struct {
	manager.Manager
}

func (*GenericControllerManager) RegisterControllers

func (m *GenericControllerManager) RegisterControllers(controllers ...Controller) Manager

RegisterControllers registers a set of controllers to the controller manager

func (*GenericControllerManager) RegisterWebhooks

func (m *GenericControllerManager) RegisterWebhooks(webhooks ...Webhook) Manager

RegisterWebhooks registers a set of webhooks to the controller manager

type Manager

type Manager interface {
	manager.Manager
	RegisterControllers(controllers ...Controller) Manager
	RegisterWebhooks(controllers ...Webhook) Manager
}

Manager manages a set of controllers and webhooks.

func NewManagerOrDie

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

NewManagerOrDie instantiates a controller manager or panics

type Object

type Object interface {
	client.Object
	StatusConditions() apis.ConditionManager
}

Object provides an abstraction over a kubernetes custom resource with methods necessary to standardize reconciliation behavior in kit.

type Webhook

type Webhook interface {
	webhook.AdmissionHandler
	Path() string
}

Webhook implements both a handler and path and can be attached to a webhook server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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