attribution

package
v1.0.2-pre.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CNRMMetricsAnnotation            = "cnrm.cloud.google.com/blueprint"
	DisableKrmAttributionEnvVariable = "KRM_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 krm, e.g., pkg, fn, live
	CmdGroup string
}

Attributor is used to attribute the krm 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 krm-<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