mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-19 04:26:45 +00:00
* fix(controller): decode old object for delete requests Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: modernize golang Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: modernize golang Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: modernize golang Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * fix: preserve ca-bundles injected from external providers Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: add metadata enforcement Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: add metadata enforcement Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: add resourcepoolclaim validation Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: add resourcepoolclaim validation Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: add resourcepoolclaim validation Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: add resourcepoolclaim validation Signed-off-by: Oliver Baehler <oliver@sudo-i.net> --------- Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> Signed-off-by: Oliver Baehler <oliver@sudo-i.net> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
35 lines
893 B
Go
35 lines
893 B
Go
// Copyright 2020-2026 Project Capsule Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package route
|
|
|
|
import (
|
|
k8smeta "k8s.io/apimachinery/pkg/api/meta"
|
|
|
|
"github.com/projectcapsule/capsule/internal/webhook/rules/status"
|
|
"github.com/projectcapsule/capsule/pkg/runtime/configuration"
|
|
"github.com/projectcapsule/capsule/pkg/runtime/handlers"
|
|
)
|
|
|
|
type rulesValidating struct {
|
|
configuration configuration.Configuration
|
|
mapper k8smeta.RESTMapper
|
|
}
|
|
|
|
func RulesValidating(mapper k8smeta.RESTMapper, configuration configuration.Configuration) handlers.Webhook {
|
|
return &rulesValidating{
|
|
configuration: configuration,
|
|
mapper: mapper,
|
|
}
|
|
}
|
|
|
|
func (w *rulesValidating) GetHandlers() []handlers.Handler {
|
|
return []handlers.Handler{
|
|
status.RuleStatusValidationHandler(w.mapper, w.configuration),
|
|
}
|
|
}
|
|
|
|
func (rulesValidating) GetPath() string {
|
|
return "/rulestatus/validating"
|
|
}
|