utils

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashAnnotation     = "kustomize.config.k8s.io/needs-hash"
	BehaviorAnnotation = "kustomize.config.k8s.io/behavior"
)

Variables

This section is empty.

Functions

func DeterminePluginSrcRoot

func DeterminePluginSrcRoot(fSys filesys.FileSystem) (string, error)

DeterminePluginSrcRoot guesses where the user has her ${g}/${v}/$lower(${k})/${k}.go files.

func FileExists

func FileExists(path string) bool

func FileModifiedAfter

func FileModifiedAfter(path string, t time.Time) bool

FileModifiedAfter returns true if the file both exists and was modified after the given time..

func FileYoungerThan

func FileYoungerThan(path string, d time.Duration) bool

FileYoungerThan returns true if the file both exists and has an age is <= the Duration argument.

func GetResMapWithIDAnnotation added in v0.4.2

func GetResMapWithIDAnnotation(rm resmap.ResMap) (resmap.ResMap, error)

GetResMapWithIDAnnotation returns a new copy of the given ResMap with the ResIds annotated in each Resource

func GoBin

func GoBin() string

func UpdateResMapValues added in v0.4.2

func UpdateResMapValues(pluginName string, h *resmap.PluginHelpers, output []byte, rm resmap.ResMap) error

UpdateResMapValues updates the Resource value in the given ResMap with the emitted Resource values in output.

func UpdateResourceOptions added in v0.4.2

func UpdateResourceOptions(rm resmap.ResMap) (resmap.ResMap, error)

UpdateResourceOptions updates the generator options for each resource in the given ResMap based on plugin provided annotations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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