mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
exec function working dir is the kustomization that referenced it (#4125)
* exec function working dir is the kustomization that referenced it * suggested changes * more code review * use a field instead of an annotation * more code review
This commit is contained in:
@@ -79,6 +79,7 @@ func NewFnPlugin(o *types.FnPluginLoadingOptions) *FnPlugin {
|
||||
StorageMounts: toStorageMounts(o.Mounts),
|
||||
Env: o.Env,
|
||||
AsCurrentUser: o.AsCurrentUser,
|
||||
WorkingDir: o.WorkingDir,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,11 @@ func (l *Loader) Config() *types.PluginConfig {
|
||||
return l.pc
|
||||
}
|
||||
|
||||
// SetWorkDir sets the working directory for this loader's plugins
|
||||
func (l *Loader) SetWorkDir(wd string) {
|
||||
l.pc.FnpLoadingOptions.WorkingDir = wd
|
||||
}
|
||||
|
||||
func (l *Loader) LoadGenerators(
|
||||
ldr ifc.Loader, v ifc.Validator, rm resmap.ResMap) ([]resmap.Generator, error) {
|
||||
var result []resmap.Generator
|
||||
|
||||
Reference in New Issue
Block a user