fadepl

package
v0.3.3-1.4.11 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SuccessSynced is used as part of the Event 'reason' when a FADepl is synced
	SuccessSynced = "Synced"
	// ErrResourceExists is used as part of the Event 'reason' when a FADepl fails
	// to sync due to a Deployment of the same name already existing.
	ErrResourceExists = "ErrResourceExists"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a Deployment already existing
	MessageResourceExists = "Resource %q already exists and is not managed by FADepl"
	// MessageResourceSynced is the message used for an Event fired when a FADepl
	// is synced successfully
	MessageResourceSynced = "FADepl synced successfully"
)

Variables

This section is empty.

Functions

func Initialize

func Initialize(kubeconfig string, masterURL string, logLevel string) (kubeclient *kubernetes.Clientset,
	fogatlasclient *clientset.Clientset)

Initialize function

func Run

func Run(kubeClient *kubernetes.Clientset, fogatlasClient *clientset.Clientset, stopCh <-chan struct{})

Run function

Types

type Controller

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

Controller is the controller implementation for FaDepl resources

func NewController

func NewController(
	kubeclientset kubernetes.Interface,
	faDeplclientset clientset.Interface,
	deploymentInformer appsinformers.DeploymentInformer,
	faDeplInformer informers.FADeplInformer) *Controller

NewController function returns a new sample controller

func (*Controller) RegisterAlgoImpl

func (c *Controller) RegisterAlgoImpl(p map[string]PlacementAlgorithm)

RegisterAlgoImpl registers an algorithm to the controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run method will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type PlacementAlgorithm

type PlacementAlgorithm interface {
	Init(name string, kubeclientset kubernetes.Interface, faDeplclientset clientset.Interface)
	CalculatePlacement(fadepl *fadeplv1alpha1.FADepl) (err error)
	CalculateUpdate(fadepl *fadeplv1alpha1.FADepl) (err error)
}

PlacementAlgorithm provides the specification of a placement algorithm

Jump to

Keyboard shortcuts

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