Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakknutsen committed Sep 25, 2020
1 parent 91a82f2 commit 1bd9bb5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pkg/k8s/mutation/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
Expand All @@ -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{}
Expand Down

0 comments on commit 1bd9bb5

Please sign in to comment.