mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
changes in client-gen
This commit is contained in:
parent
0d0eb0119e
commit
0d37fbdff9
@ -174,10 +174,11 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
}
|
||||
|
||||
var packageList []generator.Package
|
||||
typedClientBasePath := filepath.Join(customArgs.ClientsetOutputPath, customArgs.ClientsetName, "typed")
|
||||
|
||||
packageList = append(packageList, packageForClientset(customArgs, arguments.OutputPackagePath, boilerplate))
|
||||
packageList = append(packageList, packageForClientset(customArgs, typedClientBasePath, boilerplate))
|
||||
if customArgs.FakeClient {
|
||||
packageList = append(packageList, fake.PackageForClientset(customArgs, arguments.OutputPackagePath, boilerplate))
|
||||
packageList = append(packageList, fake.PackageForClientset(customArgs, typedClientBasePath, boilerplate))
|
||||
}
|
||||
|
||||
// If --clientset-only=true, we don't regenerate the individual typed clients.
|
||||
@ -188,9 +189,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
orderer := namer.Orderer{namer.NewPrivateNamer(0)}
|
||||
for _, gv := range customArgs.GroupVersions {
|
||||
types := gvToTypes[gv]
|
||||
packageList = append(packageList, packageForGroup(normalization.GroupVersion(gv), orderer.OrderTypes(types), arguments.OutputPackagePath, arguments.OutputBase, boilerplate))
|
||||
packageList = append(packageList, packageForGroup(normalization.GroupVersion(gv), orderer.OrderTypes(types), typedClientBasePath, arguments.OutputBase, boilerplate))
|
||||
if customArgs.FakeClient {
|
||||
packageList = append(packageList, fake.PackageForGroup(normalization.GroupVersion(gv), orderer.OrderTypes(types), arguments.OutputPackagePath, arguments.OutputBase, boilerplate))
|
||||
packageList = append(packageList, fake.PackageForGroup(normalization.GroupVersion(gv), orderer.OrderTypes(types), typedClientBasePath, arguments.OutputBase, boilerplate))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,8 +94,6 @@ func main() {
|
||||
arguments.InputDirs = append(dependencies, []string{
|
||||
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup",
|
||||
}...)
|
||||
// We may change the output path later.
|
||||
arguments.OutputPackagePath = "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput"
|
||||
arguments.CustomArgs = clientgenargs.Args{
|
||||
[]unversioned.GroupVersion{{Group: "testgroup", Version: ""}},
|
||||
map[unversioned.GroupVersion]string{
|
||||
@ -114,12 +112,6 @@ func main() {
|
||||
}
|
||||
glog.Infof("going to generate clientset from these input paths: %v", inputPath)
|
||||
arguments.InputDirs = append(inputPath, dependencies...)
|
||||
// TODO: we need to make OutPackagePath a map[string]string. For example,
|
||||
// we need clientset and the individual typed clients be output to different
|
||||
// output path.
|
||||
|
||||
// We may change the output path later.
|
||||
arguments.OutputPackagePath = "k8s.io/kubernetes/pkg/client/typed/generated"
|
||||
|
||||
arguments.CustomArgs = clientgenargs.Args{
|
||||
groupVersions,
|
||||
|
Loading…
Reference in New Issue
Block a user