Do no require exec/go plugin home to use fn plugins

This commit is contained in:
Katrina Verey
2021-03-22 15:51:29 -07:00
parent 710db98dbf
commit e77c284924
11 changed files with 80 additions and 83 deletions

View File

@@ -23,7 +23,7 @@ func (e *errUnableToFind) Error() string {
m = append(m, "('"+p.Value+"'; "+p.Key+")")
}
return fmt.Sprintf(
"unable to find plugin root - tried: %s", strings.Join(m, ", "))
"unable to find %s - tried: %s", e.what, strings.Join(m, ", "))
}
func NewErrUnableToFind(w string, a []Pair) *errUnableToFind {

View File

@@ -5,25 +5,6 @@ package types
// PluginConfig holds plugin configuration.
type PluginConfig struct {
// AbsPluginHome is the home of kustomize plugins.
// Kustomize plugin configuration files are k8s-style objects
// containing the fields 'apiVersion' and 'kind', e.g.
// apiVersion: apps/v1
// kind: Deployment
// kustomize reads plugin configuration data from a file path
// specified in the 'generators:' or 'transformers:' field of a
// kustomization file. kustomize must then use this data to both
// locate the plugin and configure it.
// Every kustomize plugin (its code, its tests, its supporting data
// files, etc.) must be housed in its own directory at
// ${AbsPluginHome}/${pluginApiVersion}/LOWERCASE(${pluginKind})
// where
// - ${AbsPluginHome} is an absolute path, defined below.
// - ${pluginApiVersion} is taken from the plugin config file.
// - ${pluginKind} is taken from the plugin config file.
// The value of AbsPluginHome can be any absolute path.
AbsPluginHome string
// PluginRestrictions distinguishes plugin restrictions.
PluginRestrictions PluginRestrictions