From 53e7058d7c2ac7805a2731c627287fff02cfc7d4 Mon Sep 17 00:00:00 2001 From: jennybuckley Date: Tue, 7 Aug 2018 14:37:24 -0700 Subject: [PATCH] Fix typo in webhook dry-run check Kubernetes-commit: aa36dc94cd7a2e538ad5e6ef8999fbbe9dc0df78 --- pkg/admission/plugin/webhook/mutating/dispatcher.go | 2 +- pkg/admission/plugin/webhook/validating/dispatcher.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/admission/plugin/webhook/mutating/dispatcher.go b/pkg/admission/plugin/webhook/mutating/dispatcher.go index 64e6851f8..0bda44562 100644 --- a/pkg/admission/plugin/webhook/mutating/dispatcher.go +++ b/pkg/admission/plugin/webhook/mutating/dispatcher.go @@ -84,7 +84,7 @@ func (a *mutatingDispatcher) Dispatch(ctx context.Context, attr *generic.Version func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *v1beta1.Webhook, attr *generic.VersionedAttributes) error { if attr.IsDryRun() { // TODO: support this - webhookerrors.NewDryRunUnsupportedErr(h.Name) + return webhookerrors.NewDryRunUnsupportedErr(h.Name) } // Make the webhook request diff --git a/pkg/admission/plugin/webhook/validating/dispatcher.go b/pkg/admission/plugin/webhook/validating/dispatcher.go index 74fd18680..28cfb23b0 100644 --- a/pkg/admission/plugin/webhook/validating/dispatcher.go +++ b/pkg/admission/plugin/webhook/validating/dispatcher.go @@ -99,7 +99,7 @@ func (d *validatingDispatcher) Dispatch(ctx context.Context, attr *generic.Versi func (d *validatingDispatcher) callHook(ctx context.Context, h *v1beta1.Webhook, attr *generic.VersionedAttributes) error { if attr.IsDryRun() { // TODO: support this - webhookerrors.NewDryRunUnsupportedErr(h.Name) + return webhookerrors.NewDryRunUnsupportedErr(h.Name) } // Make the webhook request