Address comment and remove if condition

Kubernetes-commit: 61fa4e6c098559b65fe28c1bf55cb817697e38e5
This commit is contained in:
Jefftree 2020-02-27 17:18:57 -08:00 committed by Kubernetes Publisher
parent 28f8e6670e
commit 13613a1c15
2 changed files with 1 additions and 4 deletions

View File

@ -325,7 +325,6 @@ func (o *AuditOptions) ApplyTo(
if checker == nil {
klog.V(2).Info("No audit policy file provided, no events will be recorded for webhook backend")
} else {
if c.EgressSelector != nil {
egressDialer, err := c.EgressSelector.Lookup(egressselector.Master.AsNetworkContext())
if err != nil {

View File

@ -96,9 +96,7 @@ func newGenericWebhook(scheme *runtime.Scheme, codecFactory serializer.CodecFact
codec := codecFactory.LegacyCodec(groupVersions...)
clientConfig.ContentConfig.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec})
if customDial != nil {
clientConfig.Dial = customDial
}
clientConfig.Dial = customDial
restClient, err := rest.UnversionedRESTClientFor(clientConfig)
if err != nil {