hncconfig

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServingPath is where the validator will run. Must be kept in sync
	// with the kubebuilder markers below.
	ServingPath = "/validate-hnc-x-k8s-io-v1alpha2-hncconfigurations"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GVKErr

type GVKErr struct {
	Reason string
	Msg    string
}

func (*GVKErr) Error

func (e *GVKErr) Error() string

type Reconciler

type Reconciler struct {
	client.Client
	Log     logr.Logger
	Manager ctrl.Manager

	// Forest is the in-memory data structure that is shared with all other reconcilers.
	Forest *forest.Forest

	// Trigger is a channel of event.GenericEvent (see "Watching Channels" in
	// https://book-v1.book.kubebuilder.io/beyond_basics/controller_watches.html)
	// that is used to enqueue the singleton to trigger reconciliation.
	Trigger chan event.GenericEvent

	// HierarchyConfigUpdates is a channel of events used to update hierarchy configuration changes performed by
	// ObjectReconcilers. It is passed on to ObjectReconcilers for the updates. The Reconciler itself does
	// not use it.
	HierarchyConfigUpdates chan event.GenericEvent
	// contains filtered or unexported fields
}

Reconciler is responsible for determining the HNC configuration from the HNCConfiguration CR, as well as ensuring all objects are propagated correctly when the HNC configuration changes. It can also set the status of the HNCConfiguration CR.

func (*Reconciler) Enqueue

func (r *Reconciler) Enqueue(reason string)

Enqueue reinvokes the reconciler

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is the entrypoint to the reconciler.

func (*Reconciler) SetupWithManager

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

SetupWithManager builds a controller with the reconciler.

type Validator

type Validator struct {
	Log    logr.Logger
	Forest *forest.Forest
	// contains filtered or unexported fields
}

func (*Validator) Handle

func (*Validator) InjectConfig

func (v *Validator) InjectConfig(cf *rest.Config) error

func (*Validator) InjectDecoder

func (v *Validator) InjectDecoder(d *admission.Decoder) error

Jump to

Keyboard shortcuts

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