mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 09:02:53 +00:00
Make a secret factory.
This commit is contained in:
@@ -69,8 +69,8 @@ func (o *buildOptions) Validate(args []string) error {
|
||||
}
|
||||
|
||||
// RunBuild runs build command.
|
||||
func (o *buildOptions) RunBuild(out io.Writer, fs fs.FileSystem) error {
|
||||
l := loader.Init([]loader.SchemeLoader{loader.NewFileLoader(fs)})
|
||||
func (o *buildOptions) RunBuild(out io.Writer, fSys fs.FileSystem) error {
|
||||
l := loader.Init([]loader.SchemeLoader{loader.NewFileLoader(fSys)})
|
||||
|
||||
absPath, err := filepath.Abs(o.kustomizationPath)
|
||||
if err != nil {
|
||||
@@ -82,7 +82,7 @@ func (o *buildOptions) RunBuild(out io.Writer, fs fs.FileSystem) error {
|
||||
return err
|
||||
}
|
||||
|
||||
application, err := app.NewApplication(rootLoader)
|
||||
application, err := app.NewApplication(rootLoader, fSys)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ func addConfigMap(k *types.Kustomization, flagsAndArgs cMapFlagsAndArgs, fSys fs
|
||||
return err
|
||||
}
|
||||
|
||||
factory := configmapandsecret.NewConfigMapFactory(cmArgs, fSys, nil)
|
||||
factory := configmapandsecret.NewConfigMapFactory(cmArgs, nil, fSys)
|
||||
|
||||
// Validate by trying to create corev1.configmap.
|
||||
_, _, err = factory.MakeUnstructAndGenerateName()
|
||||
|
||||
@@ -66,9 +66,9 @@ func (o *diffOptions) Validate(args []string) error {
|
||||
}
|
||||
|
||||
// RunDiff gets the differences between Application.MakeCustomizedResMap() and Application.MakeUncustomizedResMap().
|
||||
func (o *diffOptions) RunDiff(out, errOut io.Writer, fs fs.FileSystem) error {
|
||||
func (o *diffOptions) RunDiff(out, errOut io.Writer, fSys fs.FileSystem) error {
|
||||
|
||||
l := loader.Init([]loader.SchemeLoader{loader.NewFileLoader(fs)})
|
||||
l := loader.Init([]loader.SchemeLoader{loader.NewFileLoader(fSys)})
|
||||
|
||||
absPath, err := filepath.Abs(o.kustomizationPath)
|
||||
if err != nil {
|
||||
@@ -80,7 +80,7 @@ func (o *diffOptions) RunDiff(out, errOut io.Writer, fs fs.FileSystem) error {
|
||||
return err
|
||||
}
|
||||
|
||||
application, err := app.NewApplication(rootLoader)
|
||||
application, err := app.NewApplication(rootLoader, fSys)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user