mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
Add glob support in subcommands add patch and add configmap
This commit is contained in:
@@ -18,6 +18,8 @@ package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/kubernetes-sigs/kustomize/pkg/fs"
|
||||
)
|
||||
|
||||
// cMapFlagsAndArgs encapsulates the options for add configmap commands.
|
||||
@@ -48,3 +50,12 @@ func (a *cMapFlagsAndArgs) Validate(args []string) error {
|
||||
// TODO: Should we check if the path exists? if it's valid, if it's within the same (sub-)directory?
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *cMapFlagsAndArgs) ExpandFileSource(fSys fs.FileSystem) error {
|
||||
result, err := globPatterns(fSys, a.FileSources)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
a.FileSources = result
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user