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 soltysh committed Jul 1, 2024
1 parent b2c064e commit 365d5d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (a *AdmissionOptions) ApplyTo(
discoveryClient := cacheddiscovery.NewMemCacheClient(kubeClient.Discovery())
discoveryRESTMapper := restmapper.NewDeferredDiscoveryRESTMapper(discoveryClient)
genericInitializer := initializer.New(kubeClient, dynamicClient, informers, c.Authorization.Authorizer, features,
c.DrainedNotify(), discoveryRESTMapper)
c.DrainedNotify(), NewAdmissionRESTMapper(discoveryRESTMapper))
initializersChain := admission.PluginInitializers{genericInitializer}
initializersChain = append(initializersChain, pluginInitializers...)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package options

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 365d5d0

Please sign in to comment.