mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 09:24:23 +00:00
add MakeHashTransformer in TransformerFactory; remove hash interface
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
"sigs.k8s.io/kustomize/pkg/constants"
|
||||
"sigs.k8s.io/kustomize/pkg/fs"
|
||||
"sigs.k8s.io/kustomize/pkg/ifc"
|
||||
"sigs.k8s.io/kustomize/pkg/ifc/patch"
|
||||
"sigs.k8s.io/kustomize/pkg/ifc/transformer"
|
||||
"sigs.k8s.io/kustomize/pkg/loader"
|
||||
"sigs.k8s.io/kustomize/pkg/resmap"
|
||||
"sigs.k8s.io/kustomize/pkg/resource"
|
||||
@@ -63,8 +63,7 @@ Use different transformer configurations by passing files to kustomize
|
||||
func NewCmdBuild(
|
||||
out io.Writer, fs fs.FileSystem,
|
||||
kf ifc.KunstructuredFactory,
|
||||
ptf patch.TransformerFactory,
|
||||
hash ifc.Hash) *cobra.Command {
|
||||
ptf transformer.Factory) *cobra.Command {
|
||||
var o buildOptions
|
||||
var p string
|
||||
|
||||
@@ -78,7 +77,7 @@ func NewCmdBuild(
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunBuild(out, fs, kf, ptf, hash)
|
||||
return o.RunBuild(out, fs, kf, ptf)
|
||||
},
|
||||
}
|
||||
cmd.Flags().StringVarP(
|
||||
@@ -124,8 +123,7 @@ func (o *buildOptions) Validate(args []string, p string, fs fs.FileSystem) error
|
||||
func (o *buildOptions) RunBuild(
|
||||
out io.Writer, fSys fs.FileSystem,
|
||||
kf ifc.KunstructuredFactory,
|
||||
ptf patch.TransformerFactory,
|
||||
hash ifc.Hash) error {
|
||||
ptf transformer.Factory) error {
|
||||
rootLoader, err := loader.NewLoader(o.kustomizationPath, "", fSys)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -138,7 +136,7 @@ func (o *buildOptions) RunBuild(
|
||||
kt, err := target.NewKustTarget(
|
||||
rootLoader, fSys,
|
||||
resmap.NewFactory(resource.NewFactory(kf)),
|
||||
ptf, tc, hash)
|
||||
ptf, tc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user