Skip to content

Commit

Permalink
Change the client gen params to match the sample
Browse files Browse the repository at this point in the history
  • Loading branch information
pwittrock committed Mar 16, 2018
1 parent 8f4baff commit 88331d0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cmd/kubebuilder/build/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,22 +213,22 @@ func RunGenerate(cmd *cobra.Command, args []string) {
if doGen("client-gen") {
// Builder the versioned apis client
clientPkg := filepath.Join(util.Repo, "pkg", "client")
clientset := filepath.Join(clientPkg, "clientset_generated")
clientset := filepath.Join(clientPkg, "clientset")
c := exec.Command(filepath.Join(root, "client-gen"),
"-o", util.GoSrc,
"--go-header-file", copyright,
"--input-base", filepath.Join(util.Repo, "pkg", "apis"),
"--input", strings.Join(versionedAPIs, ","),
"--clientset-path", clientset,
"--clientset-name", "clientset",
"--clientset-name", "versioned",
)
glog.V(4).Infof("%s\n", strings.Join(c.Args, " "))
out, err := c.CombinedOutput()
if err != nil {
glog.Fatalf("failed to run client-gen %s %v", out, err)
}

listerPkg := filepath.Join(clientPkg, "listers_generated")
listerPkg := filepath.Join(clientPkg, "listers")
c = exec.Command(filepath.Join(root, "lister-gen"),
append(versioned,
"-o", util.GoSrc,
Expand All @@ -241,15 +241,14 @@ func RunGenerate(cmd *cobra.Command, args []string) {
glog.Fatalf("failed to run lister-gen %s %v", out, err)
}

informerPkg := filepath.Join(clientPkg, "informers_generated")
informerPkg := filepath.Join(clientPkg, "informers")
c = exec.Command(filepath.Join(root, "informer-gen"),
append(versioned,
"-o", util.GoSrc,
"--go-header-file", copyright,
"--output-package", informerPkg,
"--listers-package", listerPkg,
"--versioned-clientset-package", filepath.Join(clientset, "clientset"),
"--internal-clientset-package", filepath.Join(clientset, "internalclientset"))...,
"--versioned-clientset-package", filepath.Join(clientset, "versioned"))...,
)
glog.V(4).Infof("%s\n", strings.Join(c.Args, " "))
out, err = c.CombinedOutput()
Expand Down

0 comments on commit 88331d0

Please sign in to comment.