Skip to content

Commit 3093652

Browse files
author
Peng Zhou
committed
MLE-25068: Support Extra Configuration for Log Collection
1 parent be657db commit 3093652

File tree

5 files changed

+41
-57
lines changed

5 files changed

+41
-57
lines changed

api/v1/common_types.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ type LogCollection struct {
6767
// +kubebuilder:default:={"requests":{"cpu":"100m","memory":"200Mi"},"limits":{"cpu":"200m","memory":"500Mi"}}
6868
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
6969
// +kubebuilder:default:={errorLogs: true, accessLogs: true, requestLogs: true, crashLogs: true, auditLogs: true}
70-
Files LogFilesConfig `json:"files,omitempty"`
71-
// +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"
72-
Outputs string `json:"outputs,omitempty"`
70+
Files LogFilesConfig `json:"files,omitempty"`
71+
Outputs string `json:"outputs,omitempty"`
72+
Filters string `json:"filters,omitempty"`
73+
Inputs string `json:"inputs,omitempty"`
74+
Parsers string `json:"parsers,omitempty"`
7375
}
7476

7577
type LogFilesConfig struct {

charts/marklogic-operator-kubernetes/templates/marklogiccluster-crd.yaml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4735,6 +4735,8 @@ spec:
47354735
requestLogs:
47364736
type: boolean
47374737
type: object
4738+
filters:
4739+
type: string
47384740
image:
47394741
default: fluent/fluent-bit:3.2.5
47404742
type: string
@@ -4756,16 +4758,11 @@ spec:
47564758
type: object
47574759
x-kubernetes-map-type: atomic
47584760
type: array
4761+
inputs:
4762+
type: string
47594763
outputs:
4760-
default: |-
4761-
[OUTPUT]
4762-
name loki
4763-
match *
4764-
host loki.default.svc.cluster.local
4765-
port 3100
4766-
labels job=fluent-bit
4767-
http_user admin
4768-
http_passwd admin
4764+
type: string
4765+
parsers:
47694766
type: string
47704767
resources:
47714768
default:
@@ -8284,6 +8281,8 @@ spec:
82848281
requestLogs:
82858282
type: boolean
82868283
type: object
8284+
filters:
8285+
type: string
82878286
image:
82888287
default: fluent/fluent-bit:3.2.5
82898288
type: string
@@ -8305,16 +8304,11 @@ spec:
83058304
type: object
83068305
x-kubernetes-map-type: atomic
83078306
type: array
8307+
inputs:
8308+
type: string
83088309
outputs:
8309-
default: |-
8310-
[OUTPUT]
8311-
name loki
8312-
match *
8313-
host loki.default.svc.cluster.local
8314-
port 3100
8315-
labels job=fluent-bit
8316-
http_user admin
8317-
http_passwd admin
8310+
type: string
8311+
parsers:
83188312
type: string
83198313
resources:
83208314
default:

charts/marklogic-operator-kubernetes/templates/marklogicgroup-crd.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3487,6 +3487,8 @@ spec:
34873487
requestLogs:
34883488
type: boolean
34893489
type: object
3490+
filters:
3491+
type: string
34903492
image:
34913493
default: fluent/fluent-bit:3.2.5
34923494
type: string
@@ -3508,16 +3510,11 @@ spec:
35083510
type: object
35093511
x-kubernetes-map-type: atomic
35103512
type: array
3513+
inputs:
3514+
type: string
35113515
outputs:
3512-
default: |-
3513-
[OUTPUT]
3514-
name loki
3515-
match *
3516-
host loki.default.svc.cluster.local
3517-
port 3100
3518-
labels job=fluent-bit
3519-
http_user admin
3520-
http_passwd admin
3516+
type: string
3517+
parsers:
35213518
type: string
35223519
resources:
35233520
default:

config/crd/bases/marklogic.progress.com_marklogicclusters.yaml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4744,6 +4744,8 @@ spec:
47444744
requestLogs:
47454745
type: boolean
47464746
type: object
4747+
filters:
4748+
type: string
47474749
image:
47484750
default: fluent/fluent-bit:3.2.5
47494751
type: string
@@ -4765,16 +4767,11 @@ spec:
47654767
type: object
47664768
x-kubernetes-map-type: atomic
47674769
type: array
4770+
inputs:
4771+
type: string
47684772
outputs:
4769-
default: |-
4770-
[OUTPUT]
4771-
name loki
4772-
match *
4773-
host loki.default.svc.cluster.local
4774-
port 3100
4775-
labels job=fluent-bit
4776-
http_user admin
4777-
http_passwd admin
4773+
type: string
4774+
parsers:
47784775
type: string
47794776
resources:
47804777
default:
@@ -8306,6 +8303,8 @@ spec:
83068303
requestLogs:
83078304
type: boolean
83088305
type: object
8306+
filters:
8307+
type: string
83098308
image:
83108309
default: fluent/fluent-bit:3.2.5
83118310
type: string
@@ -8327,16 +8326,11 @@ spec:
83278326
type: object
83288327
x-kubernetes-map-type: atomic
83298328
type: array
8329+
inputs:
8330+
type: string
83308331
outputs:
8331-
default: |-
8332-
[OUTPUT]
8333-
name loki
8334-
match *
8335-
host loki.default.svc.cluster.local
8336-
port 3100
8337-
labels job=fluent-bit
8338-
http_user admin
8339-
http_passwd admin
8332+
type: string
8333+
parsers:
83408334
type: string
83418335
resources:
83428336
default:

config/crd/bases/marklogic.progress.com_marklogicgroups.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,6 +3494,8 @@ spec:
34943494
requestLogs:
34953495
type: boolean
34963496
type: object
3497+
filters:
3498+
type: string
34973499
image:
34983500
default: fluent/fluent-bit:3.2.5
34993501
type: string
@@ -3515,16 +3517,11 @@ spec:
35153517
type: object
35163518
x-kubernetes-map-type: atomic
35173519
type: array
3520+
inputs:
3521+
type: string
35183522
outputs:
3519-
default: |-
3520-
[OUTPUT]
3521-
name loki
3522-
match *
3523-
host loki.default.svc.cluster.local
3524-
port 3100
3525-
labels job=fluent-bit
3526-
http_user admin
3527-
http_passwd admin
3523+
type: string
3524+
parsers:
35283525
type: string
35293526
resources:
35303527
default:

0 commit comments

Comments
 (0)