package target
import "sigs.k8s.io/kustomize/api/internal/target"
Index ¶
- func IsMissingKustomizationFileError(err error) bool
- func LoadKustFile(ldr ifc.Loader) ([]byte, string, error)
- func NewErrMissingKustomization(p string) *errMissingKustomization
- type KustTarget
- func NewKustTarget( ldr ifc.Loader, validator ifc.Validator, rFactory *resmap.Factory, pLdr *loader.Loader) *KustTarget
- func (kt *KustTarget) AccumulateTarget() ( ra *accumulator.ResAccumulator, err error)
- func (kt *KustTarget) IgnoreLocal(ra *accumulator.ResAccumulator) error
- func (kt *KustTarget) Kustomization() types.Kustomization
- func (kt *KustTarget) Load() error
- func (kt *KustTarget) MakeCustomizedResMap() (resmap.ResMap, error)
Functions ¶
func IsMissingKustomizationFileError ¶
func LoadKustFile ¶
func NewErrMissingKustomization ¶
func NewErrMissingKustomization(p string) *errMissingKustomization
Types ¶
type KustTarget ¶
type KustTarget struct {
// contains filtered or unexported fields
}
KustTarget encapsulates the entirety of a kustomization build.
func NewKustTarget ¶
func NewKustTarget( ldr ifc.Loader, validator ifc.Validator, rFactory *resmap.Factory, pLdr *loader.Loader) *KustTarget
NewKustTarget returns a new instance of KustTarget.
func (*KustTarget) AccumulateTarget ¶
func (kt *KustTarget) AccumulateTarget() ( ra *accumulator.ResAccumulator, err error)
AccumulateTarget returns a new ResAccumulator, holding customized resources and the data/rules used to do so. The name back references and vars are not yet fixed. The origin parameter is used through the recursive calls to annotate each resource with information about where the resource came from, e.g. the file and/or the repository it originated from. As an entrypoint, one can pass an empty resource.Origin object to AccumulateTarget. As AccumulateTarget moves recursively through kustomization directories, it updates `origin.path` accordingly. When a remote base is found, it updates `origin.repo` and `origin.ref` accordingly.
func (*KustTarget) IgnoreLocal ¶
func (kt *KustTarget) IgnoreLocal(ra *accumulator.ResAccumulator) error
IgnoreLocal drops the local resource by checking the annotation "config.kubernetes.io/local-config".
func (*KustTarget) Kustomization ¶
func (kt *KustTarget) Kustomization() types.Kustomization
Kustomization returns a copy of the immutable, internal kustomization object.
func (*KustTarget) Load ¶
func (kt *KustTarget) Load() error
Load attempts to load the target's kustomization file.
func (*KustTarget) MakeCustomizedResMap ¶
func (kt *KustTarget) MakeCustomizedResMap() (resmap.ResMap, error)
MakeCustomizedResMap creates a fully customized ResMap per the instructions contained in its kustomization instance.
Source Files ¶
errmissingkustomization.go kusttarget.go kusttarget_configplugin.go multitransformer.go
- Version
- v0.20.1 (latest)
- Published
- Jul 23, 2025
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 2 hours ago –
Tools for package owners.