Merge pull request #115076 from hasheddan/go-restful
Fix gorestful typos in the APIServerHandler.Director docstring Kubernetes-commit: 379a1f376989a582e80738a63cc85c633f247ecf
This commit is contained in:
commit
ba2cefc22c
8
go.mod
8
go.mod
|
|
@ -42,8 +42,8 @@ require (
|
||||||
google.golang.org/protobuf v1.28.1
|
google.golang.org/protobuf v1.28.1
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||||
gopkg.in/square/go-jose.v2 v2.6.0
|
gopkg.in/square/go-jose.v2 v2.6.0
|
||||||
k8s.io/api v0.0.0-20230327181730-ec59454f24f5
|
k8s.io/api v0.0.0-20230412035552-2bdacdf27ceb
|
||||||
k8s.io/apimachinery v0.0.0-20230411235754-c1741f1470ae
|
k8s.io/apimachinery v0.0.0-20230412035310-31e4b9d241f7
|
||||||
k8s.io/client-go v0.0.0-20230412040258-8005e0d28ba2
|
k8s.io/client-go v0.0.0-20230412040258-8005e0d28ba2
|
||||||
k8s.io/component-base v0.0.0-20230327183930-4fb97becef37
|
k8s.io/component-base v0.0.0-20230327183930-4fb97becef37
|
||||||
k8s.io/klog/v2 v2.90.1
|
k8s.io/klog/v2 v2.90.1
|
||||||
|
|
@ -124,8 +124,8 @@ require (
|
||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
k8s.io/api => k8s.io/api v0.0.0-20230327181730-ec59454f24f5
|
k8s.io/api => k8s.io/api v0.0.0-20230412035552-2bdacdf27ceb
|
||||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230411235754-c1741f1470ae
|
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230412035310-31e4b9d241f7
|
||||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20230412040258-8005e0d28ba2
|
k8s.io/client-go => k8s.io/client-go v0.0.0-20230412040258-8005e0d28ba2
|
||||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20230327183930-4fb97becef37
|
k8s.io/component-base => k8s.io/component-base v0.0.0-20230327183930-4fb97becef37
|
||||||
k8s.io/kms => k8s.io/kms v0.0.0-20230315071547-f5c193c64781
|
k8s.io/kms => k8s.io/kms v0.0.0-20230315071547-f5c193c64781
|
||||||
|
|
|
||||||
8
go.sum
8
go.sum
|
|
@ -878,10 +878,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
k8s.io/api v0.0.0-20230327181730-ec59454f24f5 h1:w1YnXoFKIeL9JZfIYRn9CRdkX8/kW10SoxGzGqPZBZs=
|
k8s.io/api v0.0.0-20230412035552-2bdacdf27ceb h1:cfveC5neDeBviOYWd4lir9rh9A0es/5mJvZ5FWjyhOk=
|
||||||
k8s.io/api v0.0.0-20230327181730-ec59454f24f5/go.mod h1:RAYThv5ELmDNk2Kt+PWiwWtAI1TZyap1JK1QStRzwyw=
|
k8s.io/api v0.0.0-20230412035552-2bdacdf27ceb/go.mod h1:vtqOH+6A0ypk7hxqunFCvaEIub+VUspnbLv5dNIfIuE=
|
||||||
k8s.io/apimachinery v0.0.0-20230411235754-c1741f1470ae h1:DAZ4vnjauD5+IAaf5khBE2B2OtQpmjUbqrtUVN76DYI=
|
k8s.io/apimachinery v0.0.0-20230412035310-31e4b9d241f7 h1:a4P0At3Mtt9Rqu98XWQ1nG/hlYDhYQiCxYWDEXTz/8c=
|
||||||
k8s.io/apimachinery v0.0.0-20230411235754-c1741f1470ae/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM=
|
k8s.io/apimachinery v0.0.0-20230412035310-31e4b9d241f7/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM=
|
||||||
k8s.io/client-go v0.0.0-20230412040258-8005e0d28ba2 h1:Mxfg52BtCwS9aQ0uqJSBtpQrDvFdbTZve06ttHHOqRk=
|
k8s.io/client-go v0.0.0-20230412040258-8005e0d28ba2 h1:Mxfg52BtCwS9aQ0uqJSBtpQrDvFdbTZve06ttHHOqRk=
|
||||||
k8s.io/client-go v0.0.0-20230412040258-8005e0d28ba2/go.mod h1:OxG0CHMCzsv5/3LcNDNXMggbUbsrNzwa/4wfzm234x0=
|
k8s.io/client-go v0.0.0-20230412040258-8005e0d28ba2/go.mod h1:OxG0CHMCzsv5/3LcNDNXMggbUbsrNzwa/4wfzm234x0=
|
||||||
k8s.io/component-base v0.0.0-20230327183930-4fb97becef37 h1:zhFwQvCptlnYZrPc5cZZUVPMoU8ao2kX+6dwRhF2r2s=
|
k8s.io/component-base v0.0.0-20230327183930-4fb97becef37 h1:zhFwQvCptlnYZrPc5cZZUVPMoU8ao2kX+6dwRhF2r2s=
|
||||||
|
|
|
||||||
|
|
@ -53,13 +53,13 @@ type APIServerHandler struct {
|
||||||
// Director is here so that we can properly handle fall through and proxy cases.
|
// Director is here so that we can properly handle fall through and proxy cases.
|
||||||
// This looks a bit bonkers, but here's what's happening. We need to have /apis handling registered in gorestful in order to have
|
// This looks a bit bonkers, but here's what's happening. We need to have /apis handling registered in gorestful in order to have
|
||||||
// swagger generated for compatibility. Doing that with `/apis` as a webservice, means that it forcibly 404s (no defaulting allowed)
|
// swagger generated for compatibility. Doing that with `/apis` as a webservice, means that it forcibly 404s (no defaulting allowed)
|
||||||
// all requests which are not /apis or /apis/. We need those calls to fall through behind goresful for proper delegation. Trying to
|
// all requests which are not /apis or /apis/. We need those calls to fall through behind gorestful for proper delegation. Trying to
|
||||||
// register for a pattern which includes everything behind it doesn't work because gorestful negotiates for verbs and content encoding
|
// register for a pattern which includes everything behind it doesn't work because gorestful negotiates for verbs and content encoding
|
||||||
// and all those things go crazy when gorestful really just needs to pass through. In addition, openapi enforces unique verb constraints
|
// and all those things go crazy when gorestful really just needs to pass through. In addition, openapi enforces unique verb constraints
|
||||||
// which we don't fit into and it still muddies up swagger. Trying to switch the webservices into a route doesn't work because the
|
// which we don't fit into and it still muddies up swagger. Trying to switch the webservices into a route doesn't work because the
|
||||||
// containing webservice faces all the same problems listed above.
|
// containing webservice faces all the same problems listed above.
|
||||||
// This leads to the crazy thing done here. Our mux does what we need, so we'll place it in front of gorestful. It will introspect to
|
// This leads to the crazy thing done here. Our mux does what we need, so we'll place it in front of gorestful. It will introspect to
|
||||||
// decide if the route is likely to be handled by goresful and route there if needed. Otherwise, it goes to NonGoRestfulMux mux in
|
// decide if the route is likely to be handled by gorestful and route there if needed. Otherwise, it goes to NonGoRestfulMux mux in
|
||||||
// order to handle "normal" paths and delegation. Hopefully no API consumers will ever have to deal with this level of detail. I think
|
// order to handle "normal" paths and delegation. Hopefully no API consumers will ever have to deal with this level of detail. I think
|
||||||
// we should consider completely removing gorestful.
|
// we should consider completely removing gorestful.
|
||||||
// Other servers should only use this opaquely to delegate to an API server.
|
// Other servers should only use this opaquely to delegate to an API server.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue