mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Merge pull request #3615 from pwittrock/main
fn framework support for legacy kustomize plugin io
This commit is contained in:
@@ -130,6 +130,15 @@ func (r *ResourceList) defaultReadWriter() *kio.ByteReadWriter {
|
|||||||
|
|
||||||
// Read reads the ResourceList
|
// Read reads the ResourceList
|
||||||
func (r *ResourceList) Read() error {
|
func (r *ResourceList) Read() error {
|
||||||
|
// legacy kustomize plugin input style
|
||||||
|
legacyPlugin := os.Getenv("KUSTOMIZE_PLUGIN_CONFIG_STRING")
|
||||||
|
if legacyPlugin != "" && r.FunctionConfig != nil {
|
||||||
|
err := yaml.Unmarshal([]byte(legacyPlugin), r.FunctionConfig)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// parse the inputs from the args
|
// parse the inputs from the args
|
||||||
var readStdinStandalone bool
|
var readStdinStandalone bool
|
||||||
if len(r.Args) > 0 && !r.DisableStandalone {
|
if len(r.Args) > 0 && !r.DisableStandalone {
|
||||||
|
|||||||
Reference in New Issue
Block a user