Documentation
¶
Index ¶
Constants ¶
View Source
const AddOnPlacementScoresName = "resource-usage-score"
Variables ¶
This section is empty.
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.