Documentation ¶
Index ¶
- Constants
- Variables
- func AbsolutePluginPath(pc *types.PluginConfig, id resid.ResId) string
- func ActivePluginConfig() *types.PluginConfig
- func AddFlagEnablePlugins(set *pflag.FlagSet, v *bool)
- func DefaultPluginConfig() *types.PluginConfig
- func DefaultSrcRoot() (string, error)
- func FileExists(name string) bool
- func RecentFileExists(path string) bool
- type BuiltinPluginType
- type Compiler
- type ExecPlugin
- type Loader
- func (l *Loader) LoadGenerator(ldr ifc.Loader, res *resource.Resource) (resmap.Generator, error)
- func (l *Loader) LoadGenerators(ldr ifc.Loader, rm resmap.ResMap) ([]resmap.Generator, error)
- func (l *Loader) LoadTransformer(ldr ifc.Loader, res *resource.Resource) (resmap.Transformer, error)
- func (l *Loader) LoadTransformers(ldr ifc.Loader, rm resmap.ResMap) ([]resmap.Transformer, error)
Constants ¶
View Source
const ( // Used with Go plugins. PluginSymbol = "KustomizePlugin" // Location of builtins. BuiltinPluginPackage = "builtin" // ApiVersion of builtins. BuiltinPluginApiVersion = BuiltinPluginPackage )
Variables ¶
View Source
var GeneratorFactories = map[BuiltinPluginType]func() resmap.GeneratorPlugin{ SecretGenerator: builtin.NewSecretGeneratorPlugin, ConfigMapGenerator: builtin.NewConfigMapGeneratorPlugin, }
View Source
var TransformerFactories = map[BuiltinPluginType]func() resmap.TransformerPlugin{ NamespaceTransformer: builtin.NewNamespaceTransformerPlugin, ReplicaCountTransformer: builtin.NewReplicaCountTransformerPlugin, PatchJson6902Transformer: builtin.NewPatchJson6902TransformerPlugin, PatchStrategicMergeTransformer: builtin.NewPatchStrategicMergeTransformerPlugin, PatchTransformer: builtin.NewPatchTransformerPlugin, LabelTransformer: builtin.NewLabelTransformerPlugin, AnnotationsTransformer: builtin.NewAnnotationsTransformerPlugin, PrefixSuffixTransformer: builtin.NewPrefixSuffixTransformerPlugin, ImageTagTransformer: builtin.NewImageTagTransformerPlugin, HashTransformer: builtin.NewHashTransformerPlugin, InventoryTransformer: builtin.NewInventoryTransformerPlugin, LegacyOrderTransformer: builtin.NewLegacyOrderTransformerPlugin, }
Functions ¶
func AbsolutePluginPath ¶
func AbsolutePluginPath(pc *types.PluginConfig, id resid.ResId) string
func ActivePluginConfig ¶
func ActivePluginConfig() *types.PluginConfig
func AddFlagEnablePlugins ¶
func DefaultPluginConfig ¶
func DefaultPluginConfig() *types.PluginConfig
func DefaultSrcRoot ¶
DefaultSrcRoot guesses where the user has her ${g}/${v}/$lower(${k})/${k}.go files.
func FileExists ¶
func RecentFileExists ¶
True if file less than 3 minutes old, i.e. not accidentally left over from some earlier build.
Types ¶
type BuiltinPluginType ¶ added in v3.2.0
type BuiltinPluginType int
const ( Unknown BuiltinPluginType = iota SecretGenerator ConfigMapGenerator ReplicaCountTransformer NamespaceTransformer PatchJson6902Transformer PatchStrategicMergeTransformer PatchTransformer LabelTransformer AnnotationsTransformer PrefixSuffixTransformer ImageTagTransformer HashTransformer InventoryTransformer LegacyOrderTransformer )
func GetBuiltinPluginType ¶ added in v3.2.0
func GetBuiltinPluginType(n string) BuiltinPluginType
func (BuiltinPluginType) String ¶ added in v3.2.0
func (i BuiltinPluginType) String() string
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler creates Go plugin object files.
Source code is read from
${srcRoot}/${g}/${v}/${k}.go
Object code is written to
${objRoot}/${g}/${v}/${k}.so
func NewCompiler ¶
NewCompiler returns a new compiler instance.
func (*Compiler) Compile ¶
Compile reads ${srcRoot}/${g}/${v}/${k}.go
and writes ${objRoot}/${g}/${v}/${k}.so
type ExecPlugin ¶
type ExecPlugin struct {
// contains filtered or unexported fields
}
ExecPlugin record the name and args of an executable It triggers the executable generator and transformer
func NewExecPlugin ¶
func NewExecPlugin(p string) *ExecPlugin
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) LoadGenerator ¶
func (*Loader) LoadGenerators ¶
func (*Loader) LoadTransformer ¶
func (*Loader) LoadTransformers ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.