bundlematcher

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleMatch

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

BundleMatch stores the bundle and the matcher for the bundle

func New

func New(bundle *fleet.Bundle) (*BundleMatch, error)

func (*BundleMatch) Match

func (a *BundleMatch) Match(clusterName string, clusterGroups map[string]map[string]string, clusterLabels map[string]string) *fleet.BundleTarget

Match returns the first BundleTarget that matches the target criteria. Targets are evaluated in order. It checks for restrictions, which means that just targets included in the GitRepo can be returned. TargetCustomizations described in the fleet.yaml will be ignored. All GitRepo targets are added as TargetRestrictions, which acts as a whitelist.

func (*BundleMatch) MatchForTarget

func (a *BundleMatch) MatchForTarget(name string) *fleet.BundleTarget

func (*BundleMatch) MatchTargetCustomizations added in v0.7.0

func (a *BundleMatch) MatchTargetCustomizations(clusterName string, clusterGroups map[string]map[string]string, clusterLabels map[string]string) *fleet.BundleTarget

MatchTargetCustomizations returns the first BundleTarget that matches the target criteria. Targets are evaluated in order. It doesn't check for restrictions, which means TargetCustomizations described in the fleet.yaml are considered.

Jump to

Keyboard shortcuts

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