Codegen: subprojects openapi

Use the "subprojects" aspect of update-codegen to generat openapi for
the subprojects.  Next we can simplify and remove the generic support.

apiextensions-apiserver seems like it was ALWAYS broken:
k8s.io/apiextensions/ doesn't exist, but k8s.io/apiextensions-apiserver
does.

Fixing that causes different openapi results, obviously.
This commit is contained in:
Tim Hockin 2023-03-12 18:17:58 -07:00
parent 4c45313c3f
commit 93b2845bec
No known key found for this signature in database
3 changed files with 14 additions and 1 deletions

View File

@ -898,8 +898,8 @@ function codegen::subprojects() {
vendor/k8s.io/kube-aggregator
vendor/k8s.io/sample-apiserver
vendor/k8s.io/sample-controller
vendor/k8s.io/apiextensions-apiserver
vendor/k8s.io/metrics
vendor/k8s.io/apiextensions-apiserver
vendor/k8s.io/apiextensions-apiserver/examples/client-go
)

View File

@ -28,6 +28,13 @@ kube::codegen::gen_helpers \
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt"
kube::codegen::gen_openapi \
--input-pkg-root k8s.io/apiextensions-apiserver/pkg \
--extra-pkgs k8s.io/api/autoscaling/v1 `# needed for Scale type` \
--output-pkg-root k8s.io/apiextensions-apiserver/pkg/generated \
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt"
kube::codegen::gen_client \
--with-watch \
--input-pkg-root k8s.io/apiextensions-apiserver/pkg/apis \

View File

@ -28,6 +28,12 @@ kube::codegen::gen_helpers \
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt"
kube::codegen::gen_openapi \
--input-pkg-root k8s.io/kube-aggregator/pkg/apis \
--output-pkg-root k8s.io/kube-aggregator/pkg/generated \
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt"
kube::codegen::gen_client \
--with-watch \
--input-pkg-root k8s.io/kube-aggregator/pkg/apis \