agent

package
v0.2.0-rc8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ManagedByKSLabelKeyPrefix = "managed-by.kubestellar.io"
	TransportLabelPrefix      = "transport.kubestellar.io"
	SingletonstatusLabelKey   = "managed-by.kubestellar.io/singletonstatus"
)

Variables

This section is empty.

Functions

func NewAgentCommand

func NewAgentCommand(addonName string) *cobra.Command

Types

type Agent

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

Agent tracks objects applied by the work agent by watching AppliedManifestWork* objects. These objects list the GVR, name and namespace (the latter for namespaced objects) of each object applied by the related *ManifestWork*. The status add-on then uses this information to ensure that a singleton informer is started for each GVR, and to track status updates of each tracked object. The status add-on then creates/updates *WorkStatus* objects in the ITS with the status of tracked objects in the namespace associated with the WEC cluster. A `WorkStatus` object contains status for exactly one object, so that status updates for one object do not require updates of a whole bundle.

func NewAgent

func NewAgent(mgr ctrlm.Manager, managedRestConfig *rest.Config, hubRestConfig *rest.Config, clusterName, agentName string) (*Agent, error)

Create a new agent controller

func (*Agent) Start

func (a *Agent) Start(workers int) error

Start the agent

type AgentOptions

type AgentOptions struct {
	MetricsAddr          string
	EnableLeaderElection bool
	ProbeAddr            string
	HubKubeconfigFile    string
	SpokeClusterName     string
	AddonName            string
	AddonNamespace       string
}

AgentOptions defines the flags for workload agent

func NewAgentOptions

func NewAgentOptions(addonName string) *AgentOptions

NewAgentOptions returns the flags with default value set

func (*AgentOptions) AddFlags

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

func (*AgentOptions) RunAgent

func (o *AgentOptions) RunAgent(ctx context.Context, kubeconfig *rest.Config) error

Jump to

Keyboard shortcuts

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