Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use shared route validation and defaulting from library-go. #328

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/openshift/apiserver-library-go v0.0.0-20221017210321-925452e8316c
github.com/openshift/build-machinery-go v0.0.0-20220913142420-e25cf57ea46d
github.com/openshift/client-go v0.0.0-20220915152853-9dfefb19db2e
github.com/openshift/library-go v0.0.0-20221019150005-7eb80051883f
github.com/openshift/library-go v0.0.0-20221101142545-76526edf66e8
github.com/openshift/runtime-utils v0.0.0-20220926190846-5c488b20a19f
github.com/spf13/cobra v1.4.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,8 @@ github.com/openshift/docker-distribution v0.0.0-20180925154709-d4c35485a70d h1:t
github.com/openshift/docker-distribution v0.0.0-20180925154709-d4c35485a70d/go.mod h1:XmfFzbwryblvZ29NebonirM7RBuNEO7+yVCOapaouAk=
github.com/openshift/kubernetes-apiserver v0.0.0-20221007080208-eb103c661ea4 h1:Xyqz395I3zystaGjouZPzeV/u6TOhdFUTZZfINkjKb8=
github.com/openshift/kubernetes-apiserver v0.0.0-20221007080208-eb103c661ea4/go.mod h1:30r7xyQTREWCkG2uSjgjhQcKVvAAlqoD+YyrqR6Cn+I=
github.com/openshift/library-go v0.0.0-20221019150005-7eb80051883f h1:D02A0d49BqUjhrH1DwCIKrtG3dyVEsncO8u5hqVz1t4=
github.com/openshift/library-go v0.0.0-20221019150005-7eb80051883f/go.mod h1:KPBAXGaq7pPmA+1wUVtKr5Axg3R68IomWDkzaOxIhxM=
github.com/openshift/library-go v0.0.0-20221101142545-76526edf66e8 h1:KJdLbBWfSFSpWpCkTwBB71NNmISB/d4jpBYtHu1Vrhs=
github.com/openshift/library-go v0.0.0-20221101142545-76526edf66e8/go.mod h1:KPBAXGaq7pPmA+1wUVtKr5Axg3R68IomWDkzaOxIhxM=
github.com/openshift/moby-moby v0.0.0-20190308215630-da810a85109d h1:fLITXDjxMSvUDjnXs/zljIWktbST9+Om8XbrmmM7T4I=
github.com/openshift/moby-moby v0.0.0-20190308215630-da810a85109d/go.mod h1:LJM49W8fBVSj+rvcopJZu9mgH5Tx6HwLHySIYeGeu4k=
github.com/openshift/runtime-utils v0.0.0-20220926190846-5c488b20a19f h1:ubRzazPtplWWNWWX07v4ww74S9QL+B2RAxHJ8O00m7o=
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/openshift-apiserver/openshiftapiserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"github.com/openshift/library-go/pkg/apiserver/apiserverconfig"
"github.com/openshift/library-go/pkg/config/helpers"
"github.com/openshift/library-go/pkg/config/serving"
routehostassignment "github.com/openshift/library-go/pkg/route/hostassignment"
"github.com/openshift/openshift-apiserver/pkg/cmd/openshift-apiserver/openshiftadmission"
"github.com/openshift/openshift-apiserver/pkg/cmd/openshift-apiserver/openshiftapiserver/configprocessing"
"github.com/openshift/openshift-apiserver/pkg/image/apiserver/registryhostname"
"github.com/openshift/openshift-apiserver/pkg/route/apiserver/simplerouteallocation"
"github.com/openshift/openshift-apiserver/pkg/version"
)

Expand Down Expand Up @@ -214,7 +214,7 @@ func NewOpenshiftAPIConfig(config *openshiftcontrolplanev1.OpenShiftAPIServerCon
informers.GetKubernetesInformers().Rbac().V1(),
)

routeAllocator, err := simplerouteallocation.NewSimpleAllocationPlugin(config.RoutingConfig.Subdomain)
routeAllocator, err := routehostassignment.NewSimpleAllocationPlugin(config.RoutingConfig.Subdomain)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
quotainformer "github.com/openshift/client-go/quota/informers/externalversions"
securityv1informer "github.com/openshift/client-go/security/informers/externalversions"
"github.com/openshift/library-go/pkg/quota/clusterquotamapping"
routehostassignment "github.com/openshift/library-go/pkg/route/hostassignment"
oappsapiserver "github.com/openshift/openshift-apiserver/pkg/apps/apiserver"
authorizationapiserver "github.com/openshift/openshift-apiserver/pkg/authorization/apiserver"
"github.com/openshift/openshift-apiserver/pkg/bootstrappolicy"
Expand All @@ -46,7 +47,6 @@ import (
projectcache "github.com/openshift/openshift-apiserver/pkg/project/cache"
quotaapiserver "github.com/openshift/openshift-apiserver/pkg/quota/apiserver"
routeapiserver "github.com/openshift/openshift-apiserver/pkg/route/apiserver"
"github.com/openshift/openshift-apiserver/pkg/route/apiserver/simplerouteallocation"
securityapiserver "github.com/openshift/openshift-apiserver/pkg/security/apiserver"
templateapiserver "github.com/openshift/openshift-apiserver/pkg/template/apiserver"
"github.com/openshift/openshift-apiserver/pkg/version"
Expand Down Expand Up @@ -78,7 +78,7 @@ type OpenshiftAPIExtraConfig struct {
MaxImagesBulkImportedPerRepository int
AdditionalTrustedCA []byte

RouteAllocator *simplerouteallocation.SimpleAllocationPlugin
RouteAllocator *routehostassignment.SimpleAllocationPlugin

ProjectAuthorizationCache *projectauth.AuthorizationCache
ProjectCache *projectcache.ProjectCache
Expand Down
Loading