Documentation
¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=auditlogpersistence.hypershift.openshift.io +k8s:openapi-gen=true
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: auditlogpersistence.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
Types ¶
type AuditLogConfig ¶
type AuditLogConfig struct {
// MaxSize is the maximum size in megabytes of the audit log file before it gets rotated.
// This corresponds to the --audit-log-maxsize kube-apiserver argument.
// If not specified, defaults to 200.
// +kubebuilder:validation:Minimum=1
// +optional
MaxSize *int32 `json:"maxSize,omitempty"`
// MaxBackup is the maximum number of old audit log files to retain.
// This corresponds to the --audit-log-maxbackup kube-apiserver argument.
// If not specified, defaults to 10.
// +kubebuilder:validation:Minimum=1
// +optional
MaxBackup *int32 `json:"maxBackup,omitempty"`
}
AuditLogConfig defines audit log settings
func (*AuditLogConfig) DeepCopy ¶
func (in *AuditLogConfig) DeepCopy() *AuditLogConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditLogConfig.
func (*AuditLogConfig) DeepCopyInto ¶
func (in *AuditLogConfig) DeepCopyInto(out *AuditLogConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AuditLogPersistenceConfig ¶
type AuditLogPersistenceConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +optional
Spec AuditLogPersistenceConfigSpec `json:"spec,omitempty"`
// +optional
Status AuditLogPersistenceConfigStatus `json:"status,omitempty"`
}
AuditLogPersistenceConfig defines the desired state of AuditLogPersistenceConfig. Configuration options here allow management cluster administrators to configure persistent audit logs with automatic snapshots for kube-apiserver pods in hosted clusters.
func (*AuditLogPersistenceConfig) DeepCopy ¶
func (in *AuditLogPersistenceConfig) DeepCopy() *AuditLogPersistenceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditLogPersistenceConfig.
func (*AuditLogPersistenceConfig) DeepCopyInto ¶
func (in *AuditLogPersistenceConfig) DeepCopyInto(out *AuditLogPersistenceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AuditLogPersistenceConfig) DeepCopyObject ¶
func (in *AuditLogPersistenceConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AuditLogPersistenceConfigList ¶
type AuditLogPersistenceConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// +optional
Items []AuditLogPersistenceConfig `json:"items"`
}
AuditLogPersistenceConfigList contains a list of AuditLogPersistenceConfig
func (*AuditLogPersistenceConfigList) DeepCopy ¶
func (in *AuditLogPersistenceConfigList) DeepCopy() *AuditLogPersistenceConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditLogPersistenceConfigList.
func (*AuditLogPersistenceConfigList) DeepCopyInto ¶
func (in *AuditLogPersistenceConfigList) DeepCopyInto(out *AuditLogPersistenceConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AuditLogPersistenceConfigList) DeepCopyObject ¶
func (in *AuditLogPersistenceConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AuditLogPersistenceConfigSpec ¶
type AuditLogPersistenceConfigSpec struct {
// Enabled enables or disables the audit log persistence feature globally.
// When disabled, no PVCs will be created and no snapshots will be taken.
// Defaults to false.
// +optional
Enabled bool `json:"enabled,omitempty"`
// Storage defines the PVC configuration for audit log storage.
// +optional
Storage StorageConfig `json:"storage,omitempty"`
// AuditLog defines audit log settings that will be applied to kube-apiserver.
// +optional
AuditLog AuditLogConfig `json:"auditLog,omitempty"`
// Snapshots defines snapshot configuration for crash recovery.
// +optional
Snapshots SnapshotConfig `json:"snapshots,omitempty"`
}
AuditLogPersistenceConfigSpec defines the desired state of AuditLogPersistenceConfig
func (*AuditLogPersistenceConfigSpec) DeepCopy ¶
func (in *AuditLogPersistenceConfigSpec) DeepCopy() *AuditLogPersistenceConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditLogPersistenceConfigSpec.
func (*AuditLogPersistenceConfigSpec) DeepCopyInto ¶
func (in *AuditLogPersistenceConfigSpec) DeepCopyInto(out *AuditLogPersistenceConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AuditLogPersistenceConfigStatus ¶
type AuditLogPersistenceConfigStatus struct {
// Conditions represent the latest available observations of the configuration's state.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
AuditLogPersistenceConfigStatus defines the observed state of AuditLogPersistenceConfig
func (*AuditLogPersistenceConfigStatus) DeepCopy ¶
func (in *AuditLogPersistenceConfigStatus) DeepCopy() *AuditLogPersistenceConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditLogPersistenceConfigStatus.
func (*AuditLogPersistenceConfigStatus) DeepCopyInto ¶
func (in *AuditLogPersistenceConfigStatus) DeepCopyInto(out *AuditLogPersistenceConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnapshotConfig ¶
type SnapshotConfig struct {
// Enabled enables or disables automatic snapshot creation on pod crashes.
// Defaults to false.
// +optional
Enabled bool `json:"enabled,omitempty"`
// MinInterval is the minimum time interval between snapshots for the same pod.
// This prevents creating too many snapshots in rapid succession.
// Must be a valid duration string (e.g., "1h", "30m").
// Defaults to "1h".
// +kubebuilder:validation:Pattern=`^([0-9]+(ns|us|µs|ms|s|m|h))+$`
// +optional
MinInterval string `json:"minInterval,omitempty"`
// PerPodRetentionCount is the maximum number of snapshots to retain per PVC.
// When this limit is reached, the oldest snapshot for that PVC will be deleted.
// If not specified, defaults to 10.
// +kubebuilder:validation:Minimum=1
// +optional
PerPodRetentionCount *int32 `json:"perPodRetentionCount,omitempty"`
// NamespaceRetentionCount is the maximum total number of snapshots to retain per namespace.
// When this limit is reached, the oldest snapshot in the namespace will be deleted.
// If not specified, defaults to 50.
// +kubebuilder:validation:Minimum=1
// +optional
NamespaceRetentionCount *int32 `json:"namespaceRetentionCount,omitempty"`
// VolumeSnapshotClassName is the name of the VolumeSnapshotClass to use for creating snapshots.
// If not specified, the system will attempt to match the PVC's StorageClass provisioner
// to an appropriate VolumeSnapshotClass.
// +optional
VolumeSnapshotClassName string `json:"volumeSnapshotClassName,omitempty"`
}
SnapshotConfig defines snapshot configuration
func (*SnapshotConfig) DeepCopy ¶
func (in *SnapshotConfig) DeepCopy() *SnapshotConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotConfig.
func (*SnapshotConfig) DeepCopyInto ¶
func (in *SnapshotConfig) DeepCopyInto(out *SnapshotConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageConfig ¶
type StorageConfig struct {
// StorageClassName is the name of the StorageClass to use for PVCs.
// If not specified, the default storage class will be used.
// +optional
StorageClassName string `json:"storageClassName,omitempty"`
// Size is the size of each PVC created for kube-apiserver pods.
// Must be a valid Kubernetes quantity (e.g., "5Gi", "10Gi").
// Defaults to "5Gi".
// +optional
Size resource.Quantity `json:"size,omitempty"`
}
StorageConfig defines PVC storage configuration
func (*StorageConfig) DeepCopy ¶
func (in *StorageConfig) DeepCopy() *StorageConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConfig.
func (*StorageConfig) DeepCopyInto ¶
func (in *StorageConfig) DeepCopyInto(out *StorageConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.