Skip to content

Commit

Permalink
UPSTREAM: <carry>: hardcoded restmapper with a few entries to reboots…
Browse files Browse the repository at this point in the history
…trap SDN when SDN is down

UPSTREAM: <carry>: use hardcoded rest mapper from library-go

OpenShift-Rebase-Source: a00f75d
  • Loading branch information
deads2k authored and bertinatto committed Mar 27, 2023
1 parent 5fc48b4 commit 35bb7a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kubeapiserver/admission/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (c *Config) New(proxyTransport *http.Transport, egressSelector *egressselec
discoveryRESTMapper := restmapper.NewDeferredDiscoveryRESTMapper(discoveryClient)
kubePluginInitializer := NewPluginInitializer(
cloudConfig,
discoveryRESTMapper,
NewAdmissionRESTMapper(discoveryRESTMapper),
quotainstall.NewQuotaConfigurationForAdmission(),
schemaResolver,
)
Expand Down
11 changes: 11 additions & 0 deletions pkg/kubeapiserver/admission/patch_restmapper.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package admission

import (
"k8s.io/apimachinery/pkg/api/meta"

"github.com/openshift/library-go/pkg/client/openshiftrestmapper"
)

func NewAdmissionRESTMapper(delegate meta.RESTMapper) meta.RESTMapper {
return openshiftrestmapper.NewOpenShiftHardcodedRESTMapper(delegate)
}

0 comments on commit 35bb7a8

Please sign in to comment.