controller

package
v0.0.0-...-eb3b277 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInfo

type ClusterInfo struct {
	Cluster *api.Cluster

	ChannelVersion channel.ConfigVersion
	CurrentVersion *api.ClusterVersion
	NextVersion    *api.ClusterVersion
	NextError      error
	// contains filtered or unexported fields
}

type ClusterList

type ClusterList struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ClusterList maintains the state of all active clusters

func NewClusterList

func NewClusterList(accountFilter config.IncludeExcludeFilter) *ClusterList

func (*ClusterList) ClusterProcessed

func (clusterList *ClusterList) ClusterProcessed(cluster *ClusterInfo)

ClusterProcessed marks a cluster as no longer being processed.

func (*ClusterList) SelectNext

func (clusterList *ClusterList) SelectNext(cancelUpdate context.CancelFunc) *ClusterInfo

SelectNext returns the next cluster to update, if any, and marks it as being processed. A cluster with higher priority will be selected first, in case of ties it'll select a cluster that hasn't been updated for the longest time.

func (*ClusterList) UpdateAvailable

func (clusterList *ClusterList) UpdateAvailable(configSource channel.ConfigSource, availableClusters []*api.Cluster)

UpdateAvailable adds new clusters to the list, updates the cluster data for existing ones and removes clusters that are no longer active. It also updates the list of clusters that need to be updated with the new information.

type Controller

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

Controller defines the main control loop for the cluster-lifecycle-manager.

func New

func New(logger *log.Entry, execManager *command.ExecManager, registry registry.Registry, provisioner provisioner.Provisioner, channelConfigSourcer channel.ConfigSource, options *Options) *Controller

New initializes a new controller.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

Run the main controller loop.

type Options

type Options struct {
	Interval          time.Duration
	AccountFilter     config.IncludeExcludeFilter
	Providers         []string
	DryRun            bool
	ConcurrentUpdates uint
	EnvironmentOrder  []string
}

Options are options which can be used to configure the controller when it is initialized.

Jump to

Keyboard shortcuts

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