From 1bd9bb551f98d53eeae8ce6763ffed5b49ce3d87 Mon Sep 17 00:00:00 2001 From: Aslak Knutsen Date: Fri, 25 Sep 2020 17:02:16 +0200 Subject: [PATCH] lint --- pkg/k8s/mutation/webhook.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkg/k8s/mutation/webhook.go b/pkg/k8s/mutation/webhook.go index 0b6a6bef2..29936f78a 100644 --- a/pkg/k8s/mutation/webhook.go +++ b/pkg/k8s/mutation/webhook.go @@ -25,11 +25,6 @@ func (d *data) IsIkeable() bool { return d.Object.Labels["ike.target"] != "" } -func (d *data) Join() bool { - _, ok := d.Object.Labels["ike.session"] - return ok -} - func (d *data) Target() string { return d.Object.Labels["ike.target"] } @@ -42,17 +37,18 @@ func (d *data) Namespace() string { return d.Object.Namespace } -// Webhook to mutate Deployments with ike.target annotations to setup routing to existing pods +// Webhook to mutate Deployments with ike.target annotations to setup routing to existing pods. type Webhook struct { Client client.Client decoder *admission.Decoder } var _ admission.DecoderInjector = &Webhook{} +var _ admission.Handler = &Webhook{} // Handle will create a Session with a "existing" strategy to setup a route to the upcoming deployment. -// The deployment will be injected the correct labels to get the prod route -func (w *Webhook) Handle(ctx context.Context, req admission.Request) admission.Response { +// The deployment will be injected the correct labels to get the prod route. +func (w Webhook) Handle(ctx context.Context, req admission.Request) admission.Response { // if review.Request.DryRun don't do stuff with sideeffects.... deployment := &appsv1.Deployment{}