Skip to content

Commit 9597cb1

Browse files
committed
move swagger route to apiserver
1 parent c523476 commit 9597cb1

File tree

7 files changed

+50
-74
lines changed

7 files changed

+50
-74
lines changed

hack/build-ui.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ readonly SWAGGER_PKG="swagger"
3737
function kube::hack::build_ui() {
3838
local pkg="$1"
3939
local src="$2"
40-
local output_file="pkg/genericapiserver/server/routes/data/${pkg}/datafile.go"
40+
local output_file="staging/src/k8s.io/apiserver/pkg/server/routes/data/${pkg}/datafile.go"
4141

4242
go-bindata -nocompress -o "${output_file}" -prefix ${PWD} -pkg "${pkg}" "${src}"
4343

pkg/genericapiserver/server/routes/BUILD

+2-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ go_library(
2424
"//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library",
2525
"//pkg/genericapiserver/server/mux:go_default_library",
2626
"//pkg/genericapiserver/server/openapi:go_default_library",
27-
"//pkg/genericapiserver/server/routes/data/swagger:go_default_library",
2827
"//vendor:github.com/elazarl/go-bindata-assetfs",
2928
"//vendor:github.com/emicklei/go-restful",
3029
"//vendor:github.com/emicklei/go-restful/swagger",
@@ -34,6 +33,7 @@ go_library(
3433
"//vendor:k8s.io/apimachinery/pkg/openapi",
3534
"//vendor:k8s.io/apimachinery/pkg/version",
3635
"//vendor:k8s.io/apiserver/pkg/endpoints/metrics",
36+
"//vendor:k8s.io/apiserver/pkg/server/routes/data/swagger",
3737
"//vendor:k8s.io/apiserver/pkg/storage/etcd/metrics",
3838
],
3939
)
@@ -47,9 +47,6 @@ filegroup(
4747

4848
filegroup(
4949
name = "all-srcs",
50-
srcs = [
51-
":package-srcs",
52-
"//pkg/genericapiserver/server/routes/data/swagger:all-srcs",
53-
],
50+
srcs = [":package-srcs"],
5451
tags = ["automanaged"],
5552
)

pkg/genericapiserver/server/routes/data/swagger/BUILD

-27
This file was deleted.

pkg/genericapiserver/server/routes/swaggerui.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121

2222
assetfs "github.com/elazarl/go-bindata-assetfs"
2323

24+
"k8s.io/apiserver/pkg/server/routes/data/swagger"
2425
"k8s.io/kubernetes/pkg/genericapiserver/server/mux"
25-
"k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/swagger"
2626
)
2727

2828
// SwaggerUI exposes files in third_party/swagger-ui/ under /swagger-ui.

pkg/genericapiserver/server/routes/data/swagger/datafile.go staging/src/k8s.io/apiserver/pkg/server/routes/data/swagger/datafile.go

+40-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/BUILD

+6
Original file line numberDiff line numberDiff line change
@@ -14002,3 +14002,9 @@ go_library(
1400214002
"//vendor:k8s.io/client-go/util/clock",
1400314003
],
1400414004
)
14005+
14006+
go_library(
14007+
name = "k8s.io/apiserver/pkg/server/routes/data/swagger",
14008+
srcs = ["k8s.io/apiserver/pkg/server/routes/data/swagger/datafile.go"],
14009+
tags = ["automanaged"],
14010+
)

0 commit comments

Comments
 (0)