target

package
v0.5.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package target provides a functions to match bundles and clusters and to list the bundledeployments for that match. (fleetcontroller)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPartitionUnavailable added in v0.2.0

func IsPartitionUnavailable(status *fleet.PartitionStatus, targets []*Target) bool

func IsUnavailable

func IsUnavailable(target *fleet.BundleDeployment) bool

func MaxUnavailable

func MaxUnavailable(targets []*Target) (int, error)

func MaxUnavailablePartitions added in v0.2.0

func MaxUnavailablePartitions(partitions []Partition, targets []*Target) (int, error)

func Summary added in v0.2.0

func Summary(targets []*Target) fleet.BundleSummary

func Unavailable

func Unavailable(targets []*Target) (count int)

Types

type BundleMapping added in v0.3.0

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

func NewBundleMapping added in v0.3.0

func (*BundleMapping) Bundles added in v0.3.0

func (b *BundleMapping) Bundles() ([]*fleet.Bundle, error)

func (*BundleMapping) Matches added in v0.3.0

func (b *BundleMapping) Matches(fleetBundle *fleet.Bundle) bool

func (*BundleMapping) MatchesNamespace added in v0.3.0

func (b *BundleMapping) MatchesNamespace(namespace string) bool

func (*BundleMapping) Namespaces added in v0.3.0

func (b *BundleMapping) Namespaces() ([]*corev1.Namespace, error)

type Manager

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

func (*Manager) BundleFromDeployment added in v0.3.0

func (m *Manager) BundleFromDeployment(bd *fleet.BundleDeployment) (string, string)

func (*Manager) BundlesForCluster

func (m *Manager) BundlesForCluster(cluster *fleet.Cluster) (bundlesToRefresh, bundlesToCleanup []*fleet.Bundle, err error)

func (*Manager) GetBundleDeploymentsForBundleInCluster added in v0.3.9

func (m *Manager) GetBundleDeploymentsForBundleInCluster(app *fleet.Bundle, cluster *fleet.Cluster) (result []*fleet.BundleDeployment, err error)

func (*Manager) Targets

func (m *Manager) Targets(fleetBundle *fleet.Bundle) (result []*Target, _ error)

Targets returns all targets for a bundle, so we can create bundledeployments for each

type Partition added in v0.2.0

type Partition struct {
	Status  fleet.PartitionStatus
	Targets []*Target
}

func Partitions added in v0.2.0

func Partitions(targets []*Target) ([]Partition, error)

type Target

type Target struct {
	Deployment    *fleet.BundleDeployment
	ClusterGroups []*fleet.ClusterGroup
	Cluster       *fleet.Cluster
	Bundle        *fleet.Bundle
	Target        *fleet.BundleTarget
	Options       fleet.BundleDeploymentOptions
	DeploymentID  string
}

func (*Target) AssignNewDeployment

func (t *Target) AssignNewDeployment()

func (*Target) IsPaused

func (t *Target) IsPaused() bool

Jump to

Keyboard shortcuts

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