nameref

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package nameref contains a kio.Filter implementation of the kustomize name reference transformer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	// Referrer is the object that refers to something else by a name,
	// a name that this filter seeks to update.
	Referrer *resource.Resource

	// NameFieldToUpdate is the field in the Referrer that holds the
	// name requiring an update.
	NameFieldToUpdate types.FieldSpec `json:"nameFieldToUpdate,omitempty" yaml:"nameFieldToUpdate,omitempty"`

	// Source of the new value for the name (in its name field).
	ReferralTarget resid.Gvk

	// Set of resources to hunt through to find the ReferralTarget.
	ReferralCandidates resmap.ResMap
}

Filter updates a name references.

func (Filter) Filter

func (f Filter) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error)

At time of writing, in practice this is called with a slice with only one entry, the node also referred to be the resource in the Referrer field.

Jump to

Keyboard shortcuts

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