Skip to content

Commit

Permalink
pass kt to transformers too
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleChimera committed Sep 8, 2024
1 parent 751d70b commit 92483cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/internal/plugins/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion api/internal/target/kusttarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 92483cc

Please sign in to comment.