attribution

package
v1.0.0-beta.55 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CNRMMetricsAnnotation            = "cnrm.cloud.google.com/blueprint"
	DisableKptAttributionEnvVariable = "KPT_DISABLE_ATTRIBUTION"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributor

type Attributor struct {
	// PackagePaths is the package paths to add the attribution annotation
	PackagePaths []string

	// Resources to add the attribution annotation
	Resources []*kyaml.RNode

	// CmdGroup is the command groups in kpt, e.g., pkg, fn, live
	CmdGroup string
}

Attributor is used to attribute the kpt action on resources

func (*Attributor) Filter

func (a *Attributor) Filter(object *kyaml.RNode) (*kyaml.RNode, error)

Filter implements kyaml.Filter this filter adds "cnrm.cloud.google.com/blueprint" annotation to the resource if the annotation is already present, it appends kpt-<cmdGroup> suffix it uses "default" namespace

func (*Attributor) Process

func (a *Attributor) Process()

Process invokes Attribution kyaml filter on the resources in input packages paths

Jump to

Keyboard shortcuts

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