17
vendor/k8s.io/code-generator/cmd/client-gen/args/args.go
generated
vendored
17
vendor/k8s.io/code-generator/cmd/client-gen/args/args.go
generated
vendored
@@ -52,16 +52,22 @@ type CustomArgs struct {
|
||||
// PluralExceptions specify list of exceptions used when pluralizing certain types.
|
||||
// For example 'Endpoints:Endpoints', otherwise the pluralizer will generate 'Endpointes'.
|
||||
PluralExceptions []string
|
||||
|
||||
// ApplyConfigurationPackage is the package of apply builders generated by typebuilder-gen.
|
||||
// If non-empty, Apply functions are generated for each type and reference the apply builders.
|
||||
// If empty (""), Apply functions are not generated.
|
||||
ApplyConfigurationPackage string
|
||||
}
|
||||
|
||||
func NewDefaults() (*args.GeneratorArgs, *CustomArgs) {
|
||||
genericArgs := args.Default().WithoutDefaultFlagParsing()
|
||||
customArgs := &CustomArgs{
|
||||
ClientsetName: "internalclientset",
|
||||
ClientsetAPIPath: "/apis",
|
||||
ClientsetOnly: false,
|
||||
FakeClient: true,
|
||||
PluralExceptions: []string{"Endpoints:Endpoints"},
|
||||
ClientsetName: "internalclientset",
|
||||
ClientsetAPIPath: "/apis",
|
||||
ClientsetOnly: false,
|
||||
FakeClient: true,
|
||||
PluralExceptions: []string{"Endpoints:Endpoints"},
|
||||
ApplyConfigurationPackage: "",
|
||||
}
|
||||
genericArgs.CustomArgs = customArgs
|
||||
genericArgs.InputDirs = DefaultInputDirs
|
||||
@@ -84,6 +90,7 @@ func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet, inputBase string) {
|
||||
pflag.BoolVar(&ca.FakeClient, "fake-clientset", ca.FakeClient, "when set, client-gen will generate the fake clientset that can be used in tests")
|
||||
|
||||
fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType form")
|
||||
fs.StringVar(&ca.ApplyConfigurationPackage, "apply-configuration-package", ca.ApplyConfigurationPackage, "optional package of apply configurations, generated by applyconfiguration-gen, that are required to generate Apply functions for each type in the clientset. By default Apply functions are not generated.")
|
||||
|
||||
// support old flags
|
||||
fs.SetNormalizeFunc(mapFlagName("clientset-path", "output-package", fs.GetNormalizeFunc()))
|
||||
|
||||
Reference in New Issue
Block a user