mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-05-21 16:52:51 +00:00
* feat(webhook): add watchdog webhook to core Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * fix(controller): ensure managed metadata for namespaces on update Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore(controller): refactor core webhooks to generics Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: fix helm plugin installation Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: rename webhook to tenant-label Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> --------- Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
25 lines
565 B
Go
25 lines
565 B
Go
// Copyright 2020-2025 Project Capsule Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package route
|
|
|
|
import (
|
|
capsulewebhook "github.com/projectcapsule/capsule/internal/webhook"
|
|
)
|
|
|
|
type miscTenantAssignment struct {
|
|
handlers []capsulewebhook.Handler
|
|
}
|
|
|
|
func TenantAssignment(handlers ...capsulewebhook.Handler) capsulewebhook.Webhook {
|
|
return &miscTenantAssignment{handlers: handlers}
|
|
}
|
|
|
|
func (w miscTenantAssignment) GetPath() string {
|
|
return "/misc/tenant-label"
|
|
}
|
|
|
|
func (w miscTenantAssignment) GetHandlers() []capsulewebhook.Handler {
|
|
return w.handlers
|
|
}
|