controllers

package
v0.2.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MCADImage       = "quay.io/project-codeflare/mcad-controller:release-v1.34.1"
	InstaScaleImage = "quay.io/project-codeflare/instascale-controller:v0.0.8"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerResources added in v0.0.4

type ControllerResources struct {
	v1.ResourceRequirements
}

func (*ControllerResources) String added in v0.0.4

func (c *ControllerResources) String() string

type InstaScaleParams

type InstaScaleParams struct {
	Name                string
	Namespace           string
	Owner               manifestival.Owner
	EnableMonitoring    bool
	MaxScaleoutAllowed  int
	UseMachinePools     bool
	ControllerResources ControllerResources
	ControllerImage     string
}

func (*InstaScaleParams) ExtractParams

func (p *InstaScaleParams) ExtractParams(instascale *instascalev1alpha1.InstaScale)

type InstaScaleReconciler

type InstaScaleReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	Log           logr.Logger
	TemplatesPath string
}

InstaScaleReconciler reconciles a InstaScale object

func (*InstaScaleReconciler) Apply

func (r *InstaScaleReconciler) Apply(owner mf.Owner, params *InstaScaleParams, template string, fns ...mf.Transformer) error

func (*InstaScaleReconciler) DeleteResource

func (r *InstaScaleReconciler) DeleteResource(params *InstaScaleParams, template string, fns ...mf.Transformer) error

func (*InstaScaleReconciler) Reconcile

func (r *InstaScaleReconciler) 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 InstaScale 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.13.0/pkg/reconcile

func (*InstaScaleReconciler) ReconcileInstaScale

func (r *InstaScaleReconciler) ReconcileInstaScale(instascale *codeflarev1alpha1.InstaScale, params *InstaScaleParams) error

func (*InstaScaleReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type MCADParams

type MCADParams struct {
	Name                string
	Namespace           string
	Owner               mf.Owner
	EnableMonitoring    bool
	MultiCluster        bool
	DispatcherMode      bool
	PreemptionEnabled   bool
	AgentConfigs        string
	QuotaRestURL        string
	PodCreationTimeout  int
	ControllerResources ControllerResources
	ControllerImage     string
}

func (*MCADParams) ExtractParams

func (p *MCADParams) ExtractParams(mcad *mcadv1alpha1.MCAD)

ExtractParams is currently a straight-up copy. We can add in more complex validation at a later date

type MCADReconciler

type MCADReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	Log           logr.Logger
	TemplatesPath string
}

MCADReconciler reconciles a MCAD object

func (*MCADReconciler) Apply

func (r *MCADReconciler) Apply(owner mf.Owner, params *MCADParams, template string, fns ...mf.Transformer) error

func (*MCADReconciler) ApplyWithoutOwner

func (r *MCADReconciler) ApplyWithoutOwner(params *MCADParams, template string, fns ...mf.Transformer) error

func (*MCADReconciler) DeleteResource

func (r *MCADReconciler) DeleteResource(params *MCADParams, template string, fns ...mf.Transformer) error

func (*MCADReconciler) Reconcile

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

func (*MCADReconciler) ReconcileMCAD

func (r *MCADReconciler) ReconcileMCAD(mcad *codeflarev1alpha1.MCAD, params *MCADParams) error

func (*MCADReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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