rearmanager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package rearmanager implements the utility functions for the rear manager controller

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsProvider added in v0.1.0

func IsProvider(ctx context.Context, allocation *nodecorev1alpha1.Allocation, c client.Client) bool

IsProvider returns true if the allocation is a provider allocation base on the contract reference.

Types

type AllocationReconciler

type AllocationReconciler struct {
	client.Client
	Manager manager.Manager
	Scheme  *runtime.Scheme
}

AllocationReconciler reconciles a Allocation object.

func (*AllocationReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile

func (*AllocationReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type SolverReconciler

type SolverReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

SolverReconciler reconciles a Solver object.

func (*SolverReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile

func (*SolverReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator is the allocation webhook validator.

func NewValidator

func NewValidator(c client.Client) *Validator

NewValidator creates a new allocation webhook validator.

func (*Validator) DecodeAllocation

func (v *Validator) DecodeAllocation(obj runtime.RawExtension) (pc *nodecorev1alpha1.Allocation, err error)

DecodeAllocation decodes the Allocation from the raw extension.

func (*Validator) Handle

Handle manages the validation of the Allocation.

func (*Validator) HandleCreate

func (v *Validator) HandleCreate(ctx context.Context, req admission.Request) admission.Response

HandleCreate manages the validation of the Allocation creation.

func (*Validator) HandleDelete

func (v *Validator) HandleDelete(ctx context.Context, req admission.Request) admission.Response

HandleDelete manages the validation of the Allocation deletion.

func (*Validator) HandleUpdate

func (v *Validator) HandleUpdate(ctx context.Context, req admission.Request) admission.Response

HandleUpdate manages the validation of the Allocation update.

Jump to

Keyboard shortcuts

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