One plugin per dir.

This commit is contained in:
jregan
2019-05-19 12:00:07 -07:00
parent 31534fe47d
commit 5653ae69e4
42 changed files with 612 additions and 626 deletions

View File

@@ -1,10 +1,5 @@
// +build plugin
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
//go:generate go run sigs.k8s.io/kustomize/cmd/pluginator
package main
// Code generated by pluginator on SecretGenerator; DO NOT EDIT.
package builtin
import (
"sigs.k8s.io/kustomize/pkg/ifc"
@@ -13,16 +8,18 @@ import (
"sigs.k8s.io/yaml"
)
type plugin struct {
type SecretGeneratorPlugin struct {
ldr ifc.Loader
rf *resmap.Factory
types.GeneratorOptions
types.SecretArgs
}
var KustomizePlugin plugin
func NewSecretGeneratorPlugin() *SecretGeneratorPlugin {
return &SecretGeneratorPlugin{}
}
func (p *plugin) Config(
func (p *SecretGeneratorPlugin) Config(
ldr ifc.Loader, rf *resmap.Factory, config []byte) (err error) {
p.GeneratorOptions = types.GeneratorOptions{}
p.SecretArgs = types.SecretArgs{}
@@ -32,7 +29,7 @@ func (p *plugin) Config(
return
}
func (p *plugin) Generate() (resmap.ResMap, error) {
func (p *SecretGeneratorPlugin) Generate() (resmap.ResMap, error) {
argsList := make([]types.SecretArgs, 1)
argsList[0] = p.SecretArgs
return p.rf.NewResMapFromSecretArgs(