diff --git a/api/internal/plugins/loader/loader.go b/api/internal/plugins/loader/loader.go index a1a2e1d841..7e989ee98c 100644 --- a/api/internal/plugins/loader/loader.go +++ b/api/internal/plugins/loader/loader.go @@ -87,10 +87,10 @@ func (l *Loader) LoadGenerator( } func (l *Loader) LoadTransformers( - ldr ifc.Loader, v ifc.Validator, rm resmap.ResMap) ([]*resmap.TransformerWithProperties, error) { + ldr ifc.Loader, v ifc.Validator, rm resmap.ResMap, kt resmap.KustTargetInterface) ([]*resmap.TransformerWithProperties, error) { var result []*resmap.TransformerWithProperties for _, res := range rm.Resources() { - t, err := l.LoadTransformer(ldr, v, res) + t, err := l.LoadTransformer(ldr, v, res, kt) if err != nil { return nil, err } @@ -104,8 +104,8 @@ func (l *Loader) LoadTransformers( } func (l *Loader) LoadTransformer( - ldr ifc.Loader, v ifc.Validator, res *resource.Resource) (*resmap.TransformerWithProperties, error) { - c, err := l.loadAndConfigurePlugin(ldr, v, res, nil) + ldr ifc.Loader, v ifc.Validator, res *resource.Resource, kt resmap.KustTargetInterface) (*resmap.TransformerWithProperties, error) { + c, err := l.loadAndConfigurePlugin(ldr, v, res, kt) if err != nil { return nil, err } diff --git a/api/internal/target/kusttarget.go b/api/internal/target/kusttarget.go index bd1a6b9b63..275271085f 100644 --- a/api/internal/target/kusttarget.go +++ b/api/internal/target/kusttarget.go @@ -376,7 +376,7 @@ func (kt *KustTarget) configureExternalTransformers(transformers []string) ([]*r if err != nil { return nil, err } - return kt.pLdr.LoadTransformers(kt.ldr, kt.validator, ra.ResMap()) + return kt.pLdr.LoadTransformers(kt.ldr, kt.validator, ra.ResMap(), kt) } func (kt *KustTarget) runValidators(ra *accumulator.ResAccumulator) error {