controllers

package
v0.0.0-...-61a2cff Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceName

func GetResourceName(infra *infrav1.Infra, seqID int64) string

GetResourceName get resource name

Types

type InfraData

type InfraData struct {
	Flavor string
	Volume []VolumeData
	Count  int
}

type InfraReconciler

type InfraReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

InfraReconciler reconciles a Infra object

func (*InfraReconciler) DeleteInfra

func (r *InfraReconciler) DeleteInfra(ctx context.Context, obj client.Object) error

func (*InfraReconciler) Reconcile

func (r *InfraReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the Infra object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

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

func (*InfraReconciler) SetupWithManager

func (r *InfraReconciler) SetupWithManager(mgr ctrl.Manager, opts InfraReconcilerOptions) error

SetupWithManager sets up the controller with the Manager.

type InfraReconcilerOptions

type InfraReconcilerOptions struct {
	MaxConcurrentReconciles int
}

type InfraResourceReconciler

type InfraResourceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	logr.Logger
}

InfraResourceReconciler reconciles a InfraResource object

func (*InfraResourceReconciler) CreateOrUpdateExtensionResourcesPrice

func (r *InfraResourceReconciler) CreateOrUpdateExtensionResourcesPrice(ctx context.Context, obj client.Object) error

CreateOrUpdateExtensionResourcesPrice need to create a ExtensionResourcesPrice to make metering-quota know this resource

func (*InfraResourceReconciler) Reconcile

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

func (*InfraResourceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*InfraResourceReconciler) UpdateResourceUsed

func (r *InfraResourceReconciler) UpdateResourceUsed(ctx context.Context, obj client.Object) error

UpdateResourceUsed generate a resourceUsed per infra per interval

type VolumeData

type VolumeData struct {
	Capacity   int
	VolumeType string
}

Jump to

Keyboard shortcuts

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