utils

package
v0.4.3 Latest Latest
Warning

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

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

Documentation

Overview

Package utils contains functions and constants located in kustomize internal packages and that are needed by krmfnbuiltin.

Index

Constants

View Source
const (
	// build annotations
	BuildAnnotationPreviousKinds      = konfig.ConfigAnnoDomain + "/previousKinds"
	BuildAnnotationPreviousNames      = konfig.ConfigAnnoDomain + "/previousNames"
	BuildAnnotationPrefixes           = konfig.ConfigAnnoDomain + "/prefixes"
	BuildAnnotationSuffixes           = konfig.ConfigAnnoDomain + "/suffixes"
	BuildAnnotationPreviousNamespaces = konfig.ConfigAnnoDomain + "/previousNamespaces"
	BuildAnnotationsRefBy             = konfig.ConfigAnnoDomain + "/refBy"
	BuildAnnotationsGenBehavior       = konfig.ConfigAnnoDomain + "/generatorBehavior"
	BuildAnnotationsGenAddHashSuffix  = konfig.ConfigAnnoDomain + "/needsHashSuffix"

	// ConfigurationAnnotationDomain is the domain of function configuration
	// annotations
	ConfigurationAnnotationDomain = "config.kubernetes.io"

	LocalConfigurationAnnotationDomain = "config.kaweezle.com"

	// Function configuration annotation
	FunctionAnnotationFunction = ConfigurationAnnotationDomain + "/function"

	// true when the resource is part of the local configuration
	FunctionAnnotationLocalConfig = LocalConfigurationAnnotationDomain + "/local-config"

	// Setting to true means we want this function configuration to be injected as a
	// local configuration resource (local-config)
	FunctionAnnotationInjectLocal = LocalConfigurationAnnotationDomain + "/inject-local"

	// if set, Remove any transformation leftover annotations
	FunctionAnnotationCleanup = LocalConfigurationAnnotationDomain + "/cleanup"

	// if set, the transformation will remove all the resources marked as local-config
	FunctionAnnotationPruneLocal = LocalConfigurationAnnotationDomain + "/prune-local"
	// Saving path for injected resource
	FunctionAnnotationPath = LocalConfigurationAnnotationDomain + "/path"
	// Saving index for injected resource
	FunctionAnnotationIndex = LocalConfigurationAnnotationDomain + "/index"

	// Annotation for setting kind of in place generated resources
	FunctionAnnotationKind = LocalConfigurationAnnotationDomain + "/kind"

	// Annotation for setting api version of in place generated resources
	FunctionAnnotationApiVersion = LocalConfigurationAnnotationDomain + "/apiVersion"
)

Variables

View Source
var UnLocal kio.FilterFunc = unLocal

Functions

func RemoveBuildAnnotations

func RemoveBuildAnnotations(r *resource.Resource)

RemoveBuildAnnotations removes kustomize build annotations from r.

Contrary to the method available in resource.Resource, this method doesn't remove the file name related annotations, as this would prevent modification of the source file.

func ResourceMapFromNodes added in v0.4.0

func ResourceMapFromNodes(nodes []*yaml.RNode) resmap.ResMap

func TransferAnnotations added in v0.3.0

func TransferAnnotations(list []*yaml.RNode, config *yaml.RNode) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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