diff --git a/charts/karpenter-core/templates/webhooks.yaml b/charts/karpenter-core/templates/webhooks.yaml index 41552a04dc..73fbb53b3d 100644 --- a/charts/karpenter-core/templates/webhooks.yaml +++ b/charts/karpenter-core/templates/webhooks.yaml @@ -55,7 +55,6 @@ webhooks: operations: - CREATE - UPDATE - - DELETE --- apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration diff --git a/pkg/apis/v1alpha5/provisioner_validation.go b/pkg/apis/v1alpha5/provisioner_validation.go index f2e7d5dfa4..3e5a224dea 100644 --- a/pkg/apis/v1alpha5/provisioner_validation.go +++ b/pkg/apis/v1alpha5/provisioner_validation.go @@ -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" @@ -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"),