Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the eventlogger v1 API group +kubebuilder:object:generate=true +groupName=eventlogger.bakito.ch
Index ¶
- Variables
- type EventLogger
- func (in *EventLogger) Apply(err error)
- func (in *EventLogger) DeepCopy() *EventLogger
- func (in *EventLogger) DeepCopyInto(out *EventLogger)
- func (in *EventLogger) DeepCopyObject() runtime.Object
- func (in *EventLogger) HasChanged() bool
- func (in *EventLogger) SetupWebhookWithManager(mgr ctrl.Manager) error
- type EventLoggerList
- type EventLoggerSpec
- type EventLoggerStatus
- type Kind
- type LogField
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "eventlogger.bakito.ch", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type EventLogger ¶
type EventLogger struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec EventLoggerSpec `json:"spec,omitempty"`
Status EventLoggerStatus `json:"status,omitempty"`
}
EventLogger is the Schema for the eventloggers API
func (*EventLogger) Apply ¶
func (in *EventLogger) Apply(err error)
Apply update the status of the current event logger
func (*EventLogger) DeepCopy ¶
func (in *EventLogger) DeepCopy() *EventLogger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventLogger.
func (*EventLogger) DeepCopyInto ¶
func (in *EventLogger) DeepCopyInto(out *EventLogger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EventLogger) DeepCopyObject ¶
func (in *EventLogger) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*EventLogger) HasChanged ¶ added in v0.6.0
func (in *EventLogger) HasChanged() bool
HasChanged check if the spec or operator version has changed
func (*EventLogger) SetupWebhookWithManager ¶
func (in *EventLogger) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager setup with manager
type EventLoggerList ¶
type EventLoggerList struct {
metav1.TypeMeta ` json:",inline"`
metav1.ListMeta ` json:"metadata,omitempty"`
Items []EventLogger `json:"items"`
}
EventLoggerList contains a list of EventLogger
func (*EventLoggerList) DeepCopy ¶
func (in *EventLoggerList) DeepCopy() *EventLoggerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventLoggerList.
func (*EventLoggerList) DeepCopyInto ¶
func (in *EventLoggerList) DeepCopyInto(out *EventLoggerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EventLoggerList) DeepCopyObject ¶
func (in *EventLoggerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EventLoggerSpec ¶
type EventLoggerSpec struct {
// Kinds the kinds to log the events for
// +kubebuilder:validation:MinItems=1
Kinds []Kind `json:"kinds,omitempty"`
// EventTypes the event types to log. If empty all events are logged.
// +kubebuilder:validation:MinItems=0
EventTypes []string `json:"eventTypes,omitempty"`
// Labels additional labels for the logger pod
Labels map[string]string `json:"labels,omitempty" validate:"k8s-label-annotation-keys,k8s-label-values"`
// Labels additional annotations for the logger pod
Annotations map[string]string `json:"annotations,omitempty" validate:"k8s-label-annotation-keys"`
// ScrapeMetrics if true, prometheus scrape annotations are added to the pod
ScrapeMetrics *bool `json:"scrapeMetrics,omitempty"`
// namespace the namespace to watch on, may be an empty string
// +nullable
// +optional
Namespace *string `json:"namespace,omitempty"`
// ServiceAccount the service account to use for the logger pod
ServiceAccount string `json:"serviceAccount,omitempty"`
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this EventLoggerSpec.
// If specified, these secrets will be passed to individual puller implementations for them to use.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// NodeSelector is a selector that must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty" validate:"k8s-label-annotation-keys,k8s-label-values"`
// LogFields fields ot the event to be logged.
LogFields []LogField `json:"logFields,omitempty"`
}
EventLoggerSpec defines the desired state of EventLogger
func (*EventLoggerSpec) DeepCopy ¶
func (in *EventLoggerSpec) DeepCopy() *EventLoggerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventLoggerSpec.
func (*EventLoggerSpec) DeepCopyInto ¶
func (in *EventLoggerSpec) DeepCopyInto(out *EventLoggerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EventLoggerSpec) Hash ¶ added in v0.5.5
func (in *EventLoggerSpec) Hash() string
Hash the event
func (*EventLoggerSpec) Validate ¶ added in v0.5.5
func (in *EventLoggerSpec) Validate() error
Validate the event
type EventLoggerStatus ¶
type EventLoggerStatus struct {
// OperatorVersion the version of the operator that processed the cr
OperatorVersion string `json:"operatorVersion"`
// LastProcessed the timestamp the cr was last processed
LastProcessed metav1.Time `json:"lastProcessed"`
// Hash
Hash string `json:"hash,omitempty"`
// Error
Error string `json:"error,omitempty"`
}
EventLoggerStatus defines the observed state of EventLogger
func (*EventLoggerStatus) DeepCopy ¶
func (in *EventLoggerStatus) DeepCopy() *EventLoggerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventLoggerStatus.
func (*EventLoggerStatus) DeepCopyInto ¶
func (in *EventLoggerStatus) DeepCopyInto(out *EventLoggerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Kind ¶
type Kind struct {
// +kubebuilder:validation:MinLength=3
Name string `json:"name"`
// +optional
// +nullable
APIGroup *string `json:"apiGroup,omitempty"`
// EventTypes the event types to log. If empty events are logged as defined in spec.
// +kubebuilder:validation:MinItems=0
EventTypes []string `json:"eventTypes,omitempty"`
// Reasons the event reasons to log. If empty events with any reasons are logged.
// +kubebuilder:validation:MinItems=0
Reasons []string `json:"reasons,omitempty"`
// SkipReasons event reasons to log to skip. If empty events with any reasons are logged.
// +kubebuilder:validation:MinItems=0
SkipReasons []string `json:"skipReasons,omitempty"`
// MatchingPatterns optional regex pattern that must be contained in the message to be logged
// +kubebuilder:validation:MinItems=0
MatchingPatterns []string `json:"matchingPatterns,omitempty"`
// SkipOnMatch skip the entry if matched
SkipOnMatch *bool `json:"skipOnMatch,omitempty"`
}
Kind defines a kind to log events for
func (*Kind) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kind.
func (*Kind) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogField ¶
type LogField struct {
// name of the log field
Name string `json:"name"`
// Path within the corev1.Event struct https://github.com/kubernetes/api/blob/master/core/v1/types.go
// +kubebuilder:validation:MinItems=1
Path []string `json:"path,omitempty"`
// Value a static value of the log field. Can be used to add static log fields
// +optional
// +nullable
Value *string `json:"value,omitempty"`
}
LogField defines a log field
func (*LogField) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogField.
func (*LogField) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.