mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-19 04:26:45 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user