Documentation
¶
Index ¶
- Constants
- func ApplyDefaults(spec *auditlogpersistencev1alpha1.AuditLogPersistenceConfigSpec)
- func IsEnabled(spec *auditlogpersistencev1alpha1.AuditLogPersistenceConfigSpec) bool
- func IsSnapshotsEnabled(spec *auditlogpersistencev1alpha1.AuditLogPersistenceConfigSpec) bool
- func SetupSnapshotController(mgr ctrl.Manager) error
- type ConfigMapWebhookHandler
- type PodWebhookHandler
- type SnapshotReconciler
Constants ¶
View Source
const ( // DefaultEnabled is the default value for Spec.Enabled DefaultEnabled = false // DefaultStorageSize is the default value for Storage.Size DefaultStorageSize = "5Gi" // DefaultAuditLogMaxSize is the default value for AuditLog.MaxSize DefaultAuditLogMaxSize = int32(200) // DefaultAuditLogMaxBackup is the default value for AuditLog.MaxBackup DefaultAuditLogMaxBackup = int32(10) // DefaultSnapshotsEnabled is the default value for Snapshots.Enabled DefaultSnapshotsEnabled = false // DefaultSnapshotsMinInterval is the default value for Snapshots.MinInterval DefaultSnapshotsMinInterval = "1h" // DefaultSnapshotsPerPodRetentionCount is the default value for Snapshots.PerPodRetentionCount DefaultSnapshotsPerPodRetentionCount = int32(10) // DefaultSnapshotsNamespaceRetentionCount is the default value for Snapshots.NamespaceRetentionCount DefaultSnapshotsNamespaceRetentionCount = int32(50) )
Variables ¶
This section is empty.
Functions ¶
func ApplyDefaults ¶
func ApplyDefaults(spec *auditlogpersistencev1alpha1.AuditLogPersistenceConfigSpec)
ApplyDefaults applies default values to an AuditLogPersistenceConfigSpec. This function ensures that all fields have their default values when not explicitly set.
func IsEnabled ¶
func IsEnabled(spec *auditlogpersistencev1alpha1.AuditLogPersistenceConfigSpec) bool
IsEnabled returns the enabled value (default is false, so no special handling needed)
func IsSnapshotsEnabled ¶
func IsSnapshotsEnabled(spec *auditlogpersistencev1alpha1.AuditLogPersistenceConfigSpec) bool
IsSnapshotsEnabled returns the snapshots enabled value. ApplyDefaults should be called first to ensure defaults are applied.
func SetupSnapshotController ¶
SetupSnapshotController sets up the snapshot controller that watches Pods and creates VolumeSnapshots for kube-apiserver pods when they crash (restart count increases).
Types ¶
type ConfigMapWebhookHandler ¶
type ConfigMapWebhookHandler struct {
// contains filtered or unexported fields
}
type PodWebhookHandler ¶
type PodWebhookHandler struct {
// contains filtered or unexported fields
}
func NewPodWebhookHandler ¶
Click to show internal directories.
Click to hide internal directories.