Files
capsule/pkg/webhook/route/ownerreference.go
Dario Tranchitella 0830b3629e chore(header): moving to new neutral organization
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2023-10-16 21:29:23 +02:00

27 lines
754 B
Go

// Copyright 2020-2023 Project Capsule Authors.
// SPDX-License-Identifier: Apache-2.0
package route
import (
capsulewebhook "github.com/projectcapsule/capsule/pkg/webhook"
)
// +kubebuilder:webhook:path=/namespace-owner-reference,mutating=true,sideEffects=None,admissionReviewVersions=v1,failurePolicy=fail,groups="",resources=namespaces,verbs=create;update,versions=v1,name=owner.namespace.capsule.clastix.io
type webhook struct {
handlers []capsulewebhook.Handler
}
func OwnerReference(handlers ...capsulewebhook.Handler) capsulewebhook.Webhook {
return &webhook{handlers: handlers}
}
func (w *webhook) GetHandlers() []capsulewebhook.Handler {
return w.handlers
}
func (w *webhook) GetPath() string {
return "/namespace-owner-reference"
}