controllers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourceSigAnnotationKey is an annotation key which holds the value of the hash of the spec
	ResourceSigAnnotationKey = "resource-sig.infra.azure.com"
)

Variables

View Source
var (

	// KnownTypes defines an array of runtime.Objects to be reconciled, where each
	// object in the array will generate a controller. If the concrete type
	// implements the owner interface, the generated controller will inject the
	// owned types supplied by the Owns() method of the CRD type. Each controller
	// may directly reconcile a single object, but may indirectly watch
	// and reconcile many Owned objects. The singular type is necessary to generically
	// produce a reconcile function aware of concrete types, as a closure.
	KnownTypes = []runtime.Object{
		new(microsoftresourcesv1.ResourceGroup),
		new(microsoftnetworkv1.BackendAddressPool),
		new(microsoftnetworkv1.FrontendIPConfiguration),
		new(microsoftnetworkv1.InboundNatRule),
		new(microsoftnetworkv1.LoadBalancer),
		new(microsoftnetworkv1.LoadBalancingRule),
		new(microsoftnetworkv1.NetworkSecurityGroup),
		new(microsoftnetworkv1.OutboundRule),
		new(microsoftnetworkv1.Route),
		new(microsoftnetworkv1.RouteTable),
		new(microsoftnetworkv1.SecurityRule),
		new(microsoftnetworkv1.VirtualNetwork),
		new(microsoftnetworkv1.Subnet),
		new(microsoftnetworkv1.NetworkInterface),
		new(microsoftcomputev1.VirtualMachine),
		new(microsoftcomputev1.VirtualMachineScaleSet),
	}
)

Functions

func RegisterAll

func RegisterAll(mgr ctrl.Manager, applier zips.Applier, objs []runtime.Object, log logr.Logger, options controller.Options) []error

Types

type GenericReconciler

type GenericReconciler struct {
	Client     client.Client
	Log        logr.Logger
	Owns       []runtime.Object
	Applier    zips.Applier
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	Name       string
	GVK        schema.GroupVersionKind
	Controller controller.Controller
	Converter  *xform.ARMConverter
}

GenericReconciler reconciles a Resourcer object

func (*GenericReconciler) Reconcile

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

Reconcile will take state in K8s and apply it to Azure

Jump to

Keyboard shortcuts

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