Skip to content

Commit

Permalink
addressing comments from tomleb
Browse files Browse the repository at this point in the history
  • Loading branch information
gehrkefc committed Sep 30, 2024
1 parent 241bfe6 commit 433b7d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM=
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k=
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
Expand Down Expand Up @@ -292,6 +293,8 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-aggregator v0.31.1 h1:vrYBTTs3xMrpiEsmBjsLETZE9uuX67oQ8B3i1BFfMPw=
k8s.io/kube-aggregator v0.31.1/go.mod h1:+aW4NX50uneozN+BtoCxI4g7ND922p8Wy3tWKFDiWVk=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo=
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
Expand Down
1 change: 1 addition & 0 deletions pkg/controller-gen/generators/client_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func (cg *ClientGenerator) typesGroupVersionDocPackage(name *types.Name, gv sche
p.HeaderComment = []byte(fmt.Sprintf(`
%s
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package
// +groupName=%s
`, string(customArgs.BoilerplateContent), gv.Group))
Expand Down
6 changes: 2 additions & 4 deletions pkg/controller-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package controllergen

import (
"fmt"
"golang.org/x/exp/maps"
"io"
"os"
"path/filepath"
"sort"
"strings"

"golang.org/x/exp/maps"
"k8s.io/gengo/args"
"k8s.io/gengo/v2"
"k8s.io/gengo/v2/generator"
Expand Down Expand Up @@ -284,7 +284,7 @@ func generateOpenAPI(groups map[string]bool, customArgs *cgargs.CustomArgs) erro
openAPIArgs := oaargs.New()
openAPIArgs.OutputDir = filepath.Join(customArgs.OutputBase, customArgs.Options.OutputPackage, "openapi")
openAPIArgs.OutputFile = "zz_generated_openapi.go"
openAPIArgs.OutputPkg = customArgs.Options.OutputPackage
openAPIArgs.OutputPkg = customArgs.Options.OutputPackage + "/openapi"
openAPIArgs.GoHeaderFile = customArgs.Options.Boilerplate

if err := openAPIArgs.Validate(); err != nil {
Expand Down Expand Up @@ -315,8 +315,6 @@ func generateOpenAPI(groups map[string]bool, customArgs *cgargs.CustomArgs) erro
}
}

logrus.Info(inputDirs)

return gengo.Execute(
oa.NameSystems(),
oa.DefaultNameSystem(),
Expand Down

0 comments on commit 433b7d1

Please sign in to comment.