Skip to content

Commit

Permalink
fix: Remove deletion webhooks (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellistarn committed Feb 17, 2023
1 parent 33f74ed commit b542f6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion charts/karpenter-core/templates/webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ webhooks:
operations:
- CREATE
- UPDATE
- DELETE
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/v1alpha5/provisioner_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"github.com/samber/lo"
"go.uber.org/multierr"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/util/sets"
Expand Down Expand Up @@ -62,6 +63,13 @@ const (
providerRefPath = "providerRef"
)

func (p *Provisioner) SupportedVerbs() []admissionregistrationv1.OperationType {
return []admissionregistrationv1.OperationType{
admissionregistrationv1.Create,
admissionregistrationv1.Update,
}
}

func (p *Provisioner) Validate(ctx context.Context) (errs *apis.FieldError) {
return errs.Also(
apis.ValidateObjectMetadata(p).ViaField("metadata"),
Expand Down

0 comments on commit b542f6b

Please sign in to comment.