mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-02-14 18:09:58 +00:00
* chore: name change for webhook names Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: remove apidocs Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * feat(helm): implement crd lifecycle and values consistency Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: change default group name Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> --------- Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
27 lines
727 B
Go
27 lines
727 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=/cordoning,mutating=false,sideEffects=None,admissionReviewVersions=v1,failurePolicy=fail,groups="*",resources="*",verbs=create;update;delete,versions="*",name=cordoning.tenant.projectcapsule.dev
|
|
|
|
type cordoning struct {
|
|
handlers []capsulewebhook.Handler
|
|
}
|
|
|
|
func Cordoning(handlers ...capsulewebhook.Handler) capsulewebhook.Webhook {
|
|
return &cordoning{handlers: handlers}
|
|
}
|
|
|
|
func (w cordoning) GetPath() string {
|
|
return "/cordoning"
|
|
}
|
|
|
|
func (w cordoning) GetHandlers() []capsulewebhook.Handler {
|
|
return w.handlers
|
|
}
|