feat: add scheduler enforcement rule (#1971)

* 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: abstract ruling

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

* feat: migrate events api

* feat: migrate events api

* feat: migrate events api

* feat: migrate events api

* feat: migrate events  api

* feat: migrate events api

* feat: migrate events api

* feat: migrate events api

* feat: migrate events api

* feat: migrate events api

---------

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
This commit is contained in:
Oliver Bähler
2026-06-19 14:34:16 +02:00
committed by GitHub
parent 8a7f8a9388
commit 0b11582e4a
120 changed files with 6616 additions and 1528 deletions
@@ -59,6 +59,9 @@ type CapsuleConfigurationSpec struct {
// Service Account Client configuration for impersonation properties
// +optional
Impersonation ServiceAccountClient `json:"impersonation,omitzero"`
// Event (Audit) Configuration
// +kubebuilder:default={namespace:default}
Events EventsConfiguration `json:"events,omitempty"`
// Deprecated: use users property instead (https://projectcapsule.dev/docs/operating/setup/configuration/#users)
//
@@ -85,6 +88,12 @@ type RBACConfiguration struct {
ProvisionerClusterRole string `json:"provisioner,omitempty"`
}
type EventsConfiguration struct {
// Namespace where the events are logged for cluster scoped resources or deny events (default namespace)
// +kubebuilder:default=default
ClusterEventNamespace string `json:"namespace,omitempty"`
}
type DynamicAdmission struct {
// Service Name of the Admission Service
// +kubebuilder:default=capsule-webhook-service
+16
View File
@@ -132,6 +132,7 @@ func (in *CapsuleConfigurationSpec) DeepCopyInto(out *CapsuleConfigurationSpec)
}
out.CacheInvalidation = in.CacheInvalidation
out.Impersonation = in.Impersonation
out.Events = in.Events
if in.UserNames != nil {
in, out := &in.UserNames, &out.UserNames
*out = make([]string, len(*in))
@@ -517,6 +518,21 @@ func (in *DynamicValidatingAdmissionConfig) DeepCopy() *DynamicValidatingAdmissi
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EventsConfiguration) DeepCopyInto(out *EventsConfiguration) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventsConfiguration.
func (in *EventsConfiguration) DeepCopy() *EventsConfiguration {
if in == nil {
return nil
}
out := new(EventsConfiguration)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GatewayOptions) DeepCopyInto(out *GatewayOptions) {
*out = *in