Version: v0.0.0-...-8bd19bd Latest Latest

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 8 Imported by: 2




This section is empty.


This section is empty.


func Transform

func Transform(fs filesys.FileSystem, manifestTransform ManifestTransform, commonTransforms ...TransformFunc) error

Transform takes a Filesystem, a ManifestTransform and a set of common transforms to be applied on all the manifests, and transforms all the manifests.


type ManifestTransform

type ManifestTransform map[string][]TransformFunc

ManifestTransform is a map of manifest file path and the transformation that needs to be run on the manifest.

type OwnerRefTemplateParam

type OwnerRefTemplateParam struct {
	APIVersion         string
	Kind               string
	Name               string
	UID                types.UID
	Controller         bool
	BlockOwnerDeletion bool

OwnerRefTemplateParam stores the data for the OwnerReference template.

func GetOwnerRefTemplateParamFor

func GetOwnerRefTemplateParamFor(ownerRef metav1.OwnerReference) OwnerRefTemplateParam

GetOwnerRefTemplateParamFor returns a OwnerRefTemplateParam for a given OwnerReference.

type TransformFunc

type TransformFunc func(*yaml.RNode) error

TransformFunc is the type of a transform function. A transformation must return a TransformFunc.

func AddAnnotationsFunc

func AddAnnotationsFunc(annotations map[string]string) TransformFunc

AddAnnotationsFunc returns a TransformFunc that adds the given annotations to an object.

func AddLabelsFunc

func AddLabelsFunc(labels map[string]string) TransformFunc

AddLabelsFunc returns a TransformFunc that adds the given labels to an object.

func SetOwnerReference

func SetOwnerReference(ownerRefs []metav1.OwnerReference) TransformFunc

SetOwnerReference returns a TransformFunc that sets the ownerReferences in a given object.

func SetReplicaFunc

func SetReplicaFunc(replica int) TransformFunc

SetReplicaFunc returns a TransformFunc that sets the replicas (spec.replicas) in a given object.

Source Files

Jump to

Keyboard shortcuts

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