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

Origin-commit: 36c5e7d672bf82bd09ee382564bc03ef8e1b3a76

openshift-rebase(v1.24):source=b4aee491855

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

openshift-rebase(v1.24):source=58f3815bab1

openshift-rebase(v1.24):source=58f3815bab1

openshift-rebase(v1.24):source=58f3815bab1
  • Loading branch information
deads2k authored and soltysh committed Aug 18, 2022
1 parent d61d0c5 commit 7034a49
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(),
)

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 7034a49

Please sign in to comment.