controllers

package
v2.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 147 Imported by: 0

Documentation

Overview

Code generated by azure-service-operator-codegen. DO NOT EDIT. Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Index

Constants

View Source
const NamespaceAnnotation = "serviceoperator.azure.com/operator-namespace"

NamespaceAnnotation defines the annotation name to use when marking a resource with the namespace of the managing operator.

Variables

This section is empty.

Functions

func CreateScheme

func CreateScheme() *runtime.Scheme

func GetKnownStorageTypes

func GetKnownStorageTypes() []*registration.StorageType

func GetKnownTypes

func GetKnownTypes() []client.Object

func GetResourceExtensions

func GetResourceExtensions(scheme *runtime.Scheme) (map[schema.GroupVersionKind]genruntime.ResourceExtension, error)

GetResourceExtensions returns a map between resource and resource extension

func MakeResourceStorageTypeLookup

func MakeResourceStorageTypeLookup(mgr ctrl.Manager, objs []*registration.StorageType) (map[schema.GroupKind]schema.GroupVersionKind, error)

MakeResourceStorageTypeLookup creates a map of schema.GroupKind to schema.GroupVersionKind. This can be used to look up the storage version of any resource given the 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,
	fieldIndexer client.FieldIndexer,
	kubeClient kubeclient.Client,
	clientFactory arm.ARMClientFactory,
	objs []*registration.StorageType,
	extensions map[schema.GroupVersionKind]genruntime.ResourceExtension,
	options Options) error

func RegisterWebhooks

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

Types

type GenericReconciler

type GenericReconciler struct {
	Reconciler           genruntime.Reconciler
	LoggerFactory        LoggerFactory
	KubeClient           kubeclient.Client
	Recorder             record.EventRecorder
	Name                 string
	Config               config.Values
	GVK                  schema.GroupVersionKind
	RequeueDelayOverride time.Duration
}

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 LoggerFactory

type LoggerFactory func(genruntime.MetaObject) logr.Logger

type Options

type Options struct {
	controller.Options

	// options specific to our controller
	RequeueDelay  time.Duration
	Config        config.Values
	LoggerFactory func(obj metav1.Object) logr.Logger
}

Jump to

Keyboard shortcuts

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