Files
capsule/pkg/webhook/route/tenants.go
T
Oliver Bähler 5ac0f83c5a feat(controller): refactor namespace core loop and state management (#1680)
* feat(controller): allow owners to promote serviceaccounts within tenant as owners

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* feat(controller): refactor status handling for tenants and owned namespaces (including metrics)

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

---------

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
2025-10-06 08:19:26 +02:00

41 lines
901 B
Go

// Copyright 2020-2025 Project Capsule Authors
// SPDX-License-Identifier: Apache-2.0
package route
import (
capsulewebhook "github.com/projectcapsule/capsule/pkg/webhook"
)
type tenantValidating struct {
handlers []capsulewebhook.Handler
}
func TenantValidating(handler ...capsulewebhook.Handler) capsulewebhook.Webhook {
return &tenantValidating{handlers: handler}
}
func (w *tenantValidating) GetHandlers() []capsulewebhook.Handler {
return w.handlers
}
func (w *tenantValidating) GetPath() string {
return "/tenants/validating"
}
type tenantMutating struct {
handlers []capsulewebhook.Handler
}
func TenantMutating(handler ...capsulewebhook.Handler) capsulewebhook.Webhook {
return &tenantMutating{handlers: handler}
}
func (w *tenantMutating) GetHandlers() []capsulewebhook.Handler {
return w.handlers
}
func (w *tenantMutating) GetPath() string {
return "/tenants/mutating"
}