controllers

package
v0.0.0-...-a37997b Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateScheme

func CreateScheme() *runtime.Scheme

func GetKnownStorageTypes

func GetKnownStorageTypes() []client.Object

func GetKnownTypes

func GetKnownTypes() []client.Object

func MakeResourceGVKLookup

func MakeResourceGVKLookup(mgr ctrl.Manager, objs []client.Object) (map[schema.GroupKind]schema.GroupVersionKind, error)

MakeResourceGVKLookup creates a map of schema.GroupKind to schema.GroupVersionKind. This can be used to look up the version of a GroupKind that is being reconciled.

func NewRateLimiter

func NewRateLimiter(minBackoff time.Duration, maxBackoff time.Duration) workqueue.RateLimiter

NewRateLimiter creates a new workqueue.Ratelimiter for use controlling the speed of reconciliation. It throttles individual requests exponentially and also controls for multiple requests.

func RegisterAll

func RegisterAll(mgr ctrl.Manager, applier armclient.Applier, objs []client.Object, options Options) error

func RegisterWebhooks

func RegisterWebhooks(mgr ctrl.Manager, objs []client.Object) error

Types

type GenericReconciler

type GenericReconciler struct {
	Log                  logr.Logger
	ARMClient            armclient.Applier
	KubeClient           *kubeclient.Client
	ResourceResolver     *genruntime.Resolver
	Recorder             record.EventRecorder
	Name                 string
	GVK                  schema.GroupVersionKind
	Controller           controller.Controller
	RequeueDelayOverride time.Duration
	PositiveConditions   *conditions.PositiveConditionBuilder
	CreateDeploymentName func(obj metav1.Object) (string, error)
}

GenericReconciler reconciles resources

func (*GenericReconciler) Reconcile

func (gr *GenericReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile will take state in K8s and apply it to Azure

type Options

type Options struct {
	controller.Options

	// options specific to our controller
	RequeueDelay         time.Duration
	CreateDeploymentName func(obj metav1.Object) (string, error)
}

Jump to

Keyboard shortcuts

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