controller

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const ConversionSuccess = "success"

Variables

View Source
var (
	Namespace = "frrk8s"
	Subsystem = "k8s_client"
)

Functions

func NewStateEvent

func NewStateEvent() event.GenericEvent

func Validate

func Validate(resources ...client.ObjectList) error

Types

type ClusterResources

type ClusterResources struct {
	FRRConfigs      []v1beta1.FRRConfiguration
	PasswordSecrets map[string]corev1.Secret
}

type ConversionResultFetcher

type ConversionResultFetcher interface {
	ConversionResult() string
}

type FRRConfigurationReconciler

type FRRConfigurationReconciler struct {
	client.Client
	Scheme       *runtime.Scheme
	FRRHandler   frr.ConfigHandler
	Logger       log.Logger
	NodeName     string
	Namespace    string
	ReloadStatus func()

	AlwaysBlockCIDRS []net.IPNet
	// contains filtered or unexported fields
}

FRRConfigurationReconciler reconciles a FRRConfiguration object.

func (*FRRConfigurationReconciler) ConversionResult

func (r *FRRConfigurationReconciler) ConversionResult() string

func (*FRRConfigurationReconciler) Reconcile

func (*FRRConfigurationReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type FRRStateReconciler

type FRRStateReconciler struct {
	client.Client
	Scheme           *runtime.Scheme
	Update           chan event.GenericEvent
	Logger           log.Logger
	NodeName         string
	FRRStatus        frr.StatusFetcher
	ConversionResult ConversionResultFetcher
}

FRRStateReconciler reconciles the FRRStatus object.

func (*FRRStateReconciler) Reconcile

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

func (*FRRStateReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type TransientError

type TransientError struct {
	Message string
}

TransientError is an error that happens due to interdependencies between crds, such as referencing non-existing secrets. Since we don't want webhooks to make assumptions on ordering, we reset the fields that could cause a transient error from configurations before validating them.

func (TransientError) Error

func (e TransientError) Error() string

Jump to

Keyboard shortcuts

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