Skip to content

Commit 043e92c

Browse files
author
Peng Zhou
committed
Fix bug MLE-23487: Log Collection Default Value Override
1 parent 1afab37 commit 043e92c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

api/v1/common_types.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,17 @@ type AdminAuth struct {
5757
}
5858

5959
type LogCollection struct {
60-
Enabled bool `json:"enabled,omitempty"`
60+
// +kubebuilder:default:=false
61+
Enabled bool `json:"enabled,omitempty"`
62+
// +kubebuilder:default:="fluent/fluent-bit:3.2.5"
6163
Image string `json:"image,omitempty"`
6264
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
63-
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
64-
Files LogFilesConfig `json:"files,omitempty"`
65-
Outputs string `json:"outputs,omitempty"`
65+
// +kubebuilder:default:={"requests":{"cpu":"100m","memory":"200Mi"},"limits":{"cpu":"200m","memory":"500Mi"}}
66+
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
67+
// +kubebuilder:default:={errorLogs: true, accessLogs: true, requestLogs: true}
68+
Files LogFilesConfig `json:"files,omitempty"`
69+
// +kubebuilder:default:="[OUTPUT]\n name loki\n match *\n host loki.default.svc.cluster.local\n port 3100\n labels job=fluent-bit\n http_user admin\n http_passwd admin"
70+
Outputs string `json:"outputs,omitempty"`
6671
}
6772

6873
type LogFilesConfig struct {

0 commit comments

Comments
 (0)