package utils

import "sigs.k8s.io/kustomize/api/internal/plugins/utils"

Index

Constants

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

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

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

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

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.

Source Files

utils.go

Version
v0.20.0 (latest)
Published
Jun 28, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
11 hours ago

Tools for package owners.