mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-18 12:42:19 +00:00
35 lines
825 B
Go
35 lines
825 B
Go
// Code generated by pluginator on SecretGenerator; DO NOT EDIT.
|
|
package builtin
|
|
|
|
import (
|
|
"sigs.k8s.io/kustomize/pkg/ifc"
|
|
"sigs.k8s.io/kustomize/pkg/resmap"
|
|
"sigs.k8s.io/kustomize/pkg/types"
|
|
"sigs.k8s.io/yaml"
|
|
)
|
|
|
|
type SecretGeneratorPlugin struct {
|
|
ldr ifc.Loader
|
|
rf *resmap.Factory
|
|
types.GeneratorOptions
|
|
types.SecretArgs
|
|
}
|
|
|
|
func NewSecretGeneratorPlugin() *SecretGeneratorPlugin {
|
|
return &SecretGeneratorPlugin{}
|
|
}
|
|
|
|
func (p *SecretGeneratorPlugin) Config(
|
|
ldr ifc.Loader, rf *resmap.Factory, config []byte) (err error) {
|
|
p.GeneratorOptions = types.GeneratorOptions{}
|
|
p.SecretArgs = types.SecretArgs{}
|
|
err = yaml.Unmarshal(config, p)
|
|
p.ldr = ldr
|
|
p.rf = rf
|
|
return
|
|
}
|
|
|
|
func (p *SecretGeneratorPlugin) Generate() (resmap.ResMap, error) {
|
|
return p.rf.FromSecretArgs(p.ldr, &p.GeneratorOptions, p.SecretArgs)
|
|
}
|