anchor

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 26 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-subnamespaceanchors"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	client.Client
	Log logr.Logger

	Forest *forest.Forest
	// contains filtered or unexported fields
}

Reconciler reconciles SubnamespaceAnchor CRs to make sure all the subnamespaces are properly maintained.

func (*Reconciler) OnChangeNamespace added in v1.1.0

func (r *Reconciler) OnChangeNamespace(log logr.Logger, ns *forest.Namespace)

OnChangeNamespace enqueues a subnamespace anchor for later reconciliation. This occurs in a goroutine so the caller doesn't block; since the reconciler is never garbage-collected, this is safe.

func (*Reconciler) Reconcile

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

Reconcile sets up some basic variables and then calls the business logic. It currently only handles the creation of the namespaces but no deletion or state reporting yet.

func (*Reconciler) SetupWithManager

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

type Validator

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

func (*Validator) Handle

Handle implements the validation webhook.

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