controllers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddManagerIndices

func AddManagerIndices(indexer client.FieldIndexer) error

AddManagerIndices adds the needed manager indices for faster listing of resources

func Register

func Register(mgr manager.Manager) error

Register registers the webhooks to the manager

func ResyncPeriod added in v0.0.4

func ResyncPeriod() func() time.Duration

ResyncPeriod returns a function which generates a duration each time it is invoked; this is so that multiple controllers don't get into lock-step and all hammer the apiserver with list requests simultaneously.

Types

type AccountReconciler

type AccountReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

AccountReconciler reconciles a Account object

func (*AccountReconciler) Reconcile

func (r *AccountReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile reads that state of the cluster for an Account object and makes changes based on the state read

func (*AccountReconciler) SetupWithManager

func (r *AccountReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager adds the controller to the manager

type Context added in v0.0.4

type Context struct {
	// The controller runtime manager
	Manager manager.Manager

	// The global stop chan
	StopChan <-chan struct{}

	// SharedInformers is a generic shared informer factory that is used by multiple controller together, informers
	// stored here are different from informers in the controller-runtime manager, which should be preferred if possible
	SharedInformers informers.SharedInformerFactory

	// ObjectOrMetadataInformers creates generic informers for each group version resource
	ObjectOrMetadataInformers controller.InformerFactory

	// InformersStarted is closed as soon as the informer factories were started
	InformersStarted chan struct{}

	// DiscoveryFunc is able to discover available api resources in the cluster
	DiscoveryFunc func() ([]*metav1.APIResourceList, error)
}

Context holds informations for native kubernetes controllers that need access to a sharedindexfactory

func NewControllerContext added in v0.0.4

func NewControllerContext(mgr manager.Manager, stopChan <-chan struct{}) *Context

NewControllerContext creates a new controller context

func (*Context) Start added in v0.0.4

func (c *Context) Start()

Start starts the informer factories

type TemplateInstanceReconciler

type TemplateInstanceReconciler struct {
	client.Client

	Log    logr.Logger
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

TemplateInstanceReconciler reconciles a template instance object

func (*TemplateInstanceReconciler) Reconcile

func (r *TemplateInstanceReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile reads that state of the cluster for an Account object and makes changes based on the state read

func (*TemplateInstanceReconciler) SetupWithManager

func (r *TemplateInstanceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager adds the controller to the manager

Jump to

Keyboard shortcuts

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