Files
capsule/pkg/webhook/route/tenantresource_objs.go
Dario Tranchitella d7a48d771f refactor: moving to new neutral organization
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2023-10-16 21:29:23 +02:00

27 lines
777 B
Go

// Copyright 2020-2021 Clastix Labs
// SPDX-License-Identifier: Apache-2.0
package route
import (
capsulewebhook "github.com/projectcapsule/capsule/pkg/webhook"
)
// +kubebuilder:webhook:path=/tenantresource-objects,mutating=false,sideEffects=None,admissionReviewVersions=v1,failurePolicy=fail,groups="*",resources="*",verbs=update;delete,versions="*",name=resource-objects.tenant.capsule.clastix.io
type tntResourceObjs struct {
handlers []capsulewebhook.Handler
}
func TenantResourceObjects(handlers ...capsulewebhook.Handler) capsulewebhook.Webhook {
return &tntResourceObjs{handlers: handlers}
}
func (t tntResourceObjs) GetPath() string {
return "/tenantresource-objects"
}
func (t tntResourceObjs) GetHandlers() []capsulewebhook.Handler {
return t.handlers
}