Skip to content

Commit

Permalink
Merge pull request #55403 from sttts/sttts-client-gen-ext-group-list
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

code-generator: move kube group list out of client-gen

We had a hard-coded group list in the client-gen code for the internal Kubernetes api groups. For the external groups, we collected the actual GVs in update-codegen.sh. This PR does the latter for internal groups as well.

Kubernetes-commit: 899f7ff97d5fa5f16831b3e09c6cb9ccfdf73479
  • Loading branch information
k8s-publish-robot committed Nov 29, 2017
2 parents 49749c3 + 4845a33 commit 61724b0
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions cmd/client-gen/args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,8 @@ type CustomArgs struct {
FakeClient bool
}

var defaultInput = []string{
"api/",
"admissionregistration/",
"authentication/",
"authorization/",
"autoscaling/",
"batch/",
"certificates/",
"extensions/",
"rbac/",
"storage/",
"apps/",
"policy/",
"scheduling/",
"settings/",
"networking/",
}

func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) {
pflag.Var(NewGVPackagesValue(&ca.GroupVersionToInputPath, &ca.Groups, defaultInput), "input", "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\".")
pflag.Var(NewGVPackagesValue(&ca.GroupVersionToInputPath, &ca.Groups, nil), "input", "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\".")
pflag.Var(NewGVTypesValue(&ca.IncludedTypesOverrides, []string{}), "included-types-overrides", "list of group/version/type for which client should be generated. By default, client is generated for all types which have genclient in types.go. This overrides that. For each groupVersion in this list, only the types mentioned here will be included. The default check of genclient will be used for other group versions.")
pflag.StringVar(&ca.InputBasePath, "input-base", "k8s.io/kubernetes/pkg/apis", "base path to look for the api group.")
pflag.StringVarP(&ca.ClientsetName, "clientset-name", "n", "internalclientset", "the name of the generated clientset package.")
Expand Down

0 comments on commit 61724b0

Please sign in to comment.