controller

package
v0.0.0-...-b0e32b7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BoskosIdLabel = "boskos-lease-id"
)

Variables

View Source
var (
	PoolMemoryAvailable = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "pool_memory_available",
		Help: "The amount of memory available in a pool",
	}, []string{"namespace", "pool"})

	PoolCpusAvailable = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "pool_cpus_available",
		Help: "The amount of cpus available in a pool",
	}, []string{"namespace", "pool"})

	PoolNetworksAvailable = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "pool_networks_available",
		Help: "Number of currently used networks",
	}, []string{"namespace", "pool"})

	LeasesInUse = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "leases_in_use",
		Help: "Number of leases in use",
	}, []string{"namespace", "pool"})
)

Functions

func InitMetrics

func InitMetrics()

Types

type LeaseReconciler

type LeaseReconciler struct {
	client.Client
	Scheme         *runtime.Scheme
	Recorder       record.EventRecorder
	RESTMapper     meta.RESTMapper
	UncachedClient client.Client

	// Namespace is the namespace in which the ControlPlaneMachineSet controller should operate.
	// Any ControlPlaneMachineSet not in this namespace should be ignored.
	Namespace string

	// OperatorName is the name of the ClusterOperator with which the controller should report
	// its status.
	OperatorName string

	// ReleaseVersion is the version of current cluster operator release.
	ReleaseVersion string
}

func (*LeaseReconciler) Reconcile

func (l *LeaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*LeaseReconciler) SetupWithManager

func (l *LeaseReconciler) SetupWithManager(mgr ctrl.Manager) error

type NamespaceReconciler

type NamespaceReconciler struct {
	client.Client
	Scheme         *runtime.Scheme
	Recorder       record.EventRecorder
	RESTMapper     meta.RESTMapper
	UncachedClient client.Client

	// Namespace is the namespace in which the ControlPlaneMachineSet controller should operate.
	// Any ControlPlaneMachineSet not in this namespace should be ignored.
	Namespace string

	// OperatorName is the name of the ClusterOperator with which the controller should report
	// its status.
	OperatorName string

	// ReleaseVersion is the version of current cluster operator release.
	ReleaseVersion string
}

func (*NamespaceReconciler) PruneAbandonedLeases

func (l *NamespaceReconciler) PruneAbandonedLeases(ctx context.Context)

func (*NamespaceReconciler) SetupWithManager

func (l *NamespaceReconciler) SetupWithManager(mgr ctrl.Manager) error

type NetworkReconciler

type NetworkReconciler struct {
	client.Client
	Scheme         *runtime.Scheme
	Recorder       record.EventRecorder
	RESTMapper     meta.RESTMapper
	UncachedClient client.Client

	// Namespace is the namespace in which the ControlPlaneMachineSet controller should operate.
	// Any ControlPlaneMachineSet not in this namespace should be ignored.
	Namespace string

	// OperatorName is the name of the ClusterOperator with which the controller should report
	// its status.
	OperatorName string

	// ReleaseVersion is the version of current cluster operator release.
	ReleaseVersion string
}

func (*NetworkReconciler) Reconcile

func (l *NetworkReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*NetworkReconciler) SetupWithManager

func (l *NetworkReconciler) SetupWithManager(mgr ctrl.Manager) error

type PoolReconciler

type PoolReconciler struct {
	client.Client
	Scheme         *runtime.Scheme
	Recorder       record.EventRecorder
	RESTMapper     meta.RESTMapper
	UncachedClient client.Client

	// Namespace is the namespace in which the ControlPlaneMachineSet controller should operate.
	// Any ControlPlaneMachineSet not in this namespace should be ignored.
	Namespace string

	// OperatorName is the name of the ClusterOperator with which the controller should report
	// its status.
	OperatorName string

	// ReleaseVersion is the version of current cluster operator release.
	ReleaseVersion string
}

func (*PoolReconciler) Reconcile

func (l *PoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PoolReconciler) SetupWithManager

func (l *PoolReconciler) SetupWithManager(mgr ctrl.Manager) error

Jump to

Keyboard shortcuts

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