scorespoke

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const AddOnPlacementScoresName = "resource-usage-score"

Variables

This section is empty.

Functions

func NewAgentCommand

func NewAgentCommand(componentName, addonName string, logger logr.Logger) *cobra.Command

NewAgentCommand creates a new Cobra command to start the agent for a specific component.

Types

type AgentController

type AgentController struct {
	AddOnPlacementScoreLister v1alpha1.AddOnPlacementScoreLister

	Logger logr.Logger
	// contains filtered or unexported fields
}

AgentController defines the controller to run the agent.

type AgentOptions

type AgentOptions struct {
	Logger            logr.Logger
	HubKubeconfigFile string
	SpokeClusterName  string
	AddonName         string
	AddonNamespace    string
}

AgentOptions defines the flags for workload agent.

func NewAgentOptions

func NewAgentOptions(addonName string, logger logr.Logger) *AgentOptions

NewAgentOptions returns a new instance of AgentOptions.

func (*AgentOptions) AddFlags

func (o *AgentOptions) AddFlags(cmd *cobra.Command)

AddFlags adds flags to the provided Cobra command.

func (*AgentOptions) RunAgent

func (o *AgentOptions) RunAgent(ctx context.Context, controllerContext *controllercmd.ControllerContext) error

RunAgent starts the controllers on agent to process work from hub.

type ResourceScore

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

ResourceScore defines a struct used to compute the score of a resource.

func NewResourceScore

func NewResourceScore(nodeInformer corev1informers.NodeInformer, podInformer corev1informers.PodInformer, logger logr.Logger) *ResourceScore

NewResourceScore returns a new instance of ResourceScore.

Jump to

Keyboard shortcuts

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