File tree Expand file tree Collapse file tree 7 files changed +38
-261
lines changed Expand file tree Collapse file tree 7 files changed +38
-261
lines changed Original file line number Diff line number Diff line change @@ -14,56 +14,25 @@ data:
14
14
apiVersion : v1
15
15
kind : ConfigMap
16
16
metadata :
17
- name : fluentd-config
17
+ name : {{ .Values.logging.configMapName }}
18
18
namespace : {{ .Release.Namespace }}
19
- labels :
20
- kubernetes.io/cluster-service : " true"
21
19
data :
22
- fluent.conf : |
23
- <match fluent.**>
24
- @type null
25
- </match>
26
-
27
- <source>
28
- @type tail
29
- @id tail_marklogic_logs
30
- format none
31
- path /var/opt/MarkLogic/Logs/*
32
- pos_file /tmp/log/ml-logs.log.pos
33
- path_key log_file
34
- tag marklogic.logs
35
- read_from_head true
36
- <parse>
37
- @type none
38
- time_key @timestamp
39
- time_format %Y-%m-%dT%H:%M:%S.%N%z
40
- keep_time_key true
41
- </parse>
42
- </source>
43
-
44
- <filter marklogic.logs>
45
- @type record_transformer
46
- enable_ruby true
47
- <record>
48
- # overwrite full path to file name
49
- log_file ${File.basename(record["log_file"])}
50
- </record>
51
- </filter>
52
-
53
- <match marklogic.logs>
54
- @type elasticsearch
55
- host elasticsearch.default.svc.cluster.local
56
- port 9200
57
- user admin
58
- password admin
59
- index_name fluentd.${tag}
60
- include_timestamp true
61
- utc_index false
62
- time_key_format "%Y-%m-%dT%H:%M:%S.%N%z"
63
- time_key time
64
- logstash_format true
65
- logstash_prefix marklogic.logs
66
- path_key out/${log_file}
67
- flush_interval 1s
68
- </match>
20
+ fluent-bit.conf : |
21
+ [SERVICE]
22
+ Flush 5
23
+ Log_Level info
24
+ Daemon off
25
+
26
+ [INPUT]
27
+ Name tail
28
+ Path {{ .Values.persistence.mountPath }}/Logs/*
29
+ Tag marklogic-logs
30
+ Path_Key path
69
31
32
+ [OUTPUT]
33
+ Name es
34
+ Match *
35
+ Host {{ .Values.logging.host }}
36
+ Port {{ .Values.logging.port }}
37
+ HTTP_User {{ .Values.logging.username }}
38
+ HTTP_Passwd {{ .Values.logging.password }}
Original file line number Diff line number Diff line change @@ -96,23 +96,20 @@ spec:
96
96
{{- with .Values.resources }}
97
97
resources : {{- toYaml . | nindent 12 }}
98
98
{{- end }}
99
- - name : fluentd
100
- env :
101
- - name : FLUENT_UID
102
- value : root
103
- - name : FLUENT_CONF
104
- value : fluent.conf
105
- - name : FLUENTD_ARGS
106
- value : -c /fluentd/etc/fluent.conf
107
- image : saravak/fluentd:elastic
99
+ {{- if .Values.logging.enabled }}
100
+ - name : fluent-bit
101
+ image : fluent/fluent-bit:latest
102
+ imagePullPolicy : IfNotPresent
108
103
volumeMounts :
109
104
- name : datadir
110
105
mountPath : {{ .Values.persistence.mountPath }}
111
106
{{- if .Values.extraVolumeMounts }}
112
107
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
113
108
{{- end }}
114
- - name : fdconf
115
- mountPath : /fluentd/etc/
109
+ - name : {{ .Values.logging.configMapName }}
110
+ mountPath : /fluent-bit/etc/fluent-bit.conf
111
+ subPath : fluent-bit.conf
112
+ {{- end }}
116
113
dnsConfig :
117
114
searches :
118
115
- {{ include "marklogic.headlessURL" . }}
@@ -121,9 +118,11 @@ spec:
121
118
- name : {{ include "marklogic.fullname" . }}-registry
122
119
{{- end }}
123
120
volumes :
124
- - name : fdconf
121
+ {{- if .Values.logging.enabled }}
122
+ - name : {{ .Values.logging.configMapName }}
125
123
configMap :
126
- name : fluentd-config
124
+ name : {{ .Values.logging.configMapName }}
125
+ {{- end }}
127
126
{{- if or (not .Values.persistence.enabled) (.Values.extraVolumes) }}
128
127
{{- if not .Values.persistence.enabled }}
129
128
- name : datadir
Original file line number Diff line number Diff line change @@ -110,3 +110,10 @@ startupProbe:
110
110
failureThreshold : 30
111
111
successThreshold : 1
112
112
113
+ logging :
114
+ enabled : true
115
+ username : admin
116
+ password : admin
117
+ configMapName : fluent-bit-config
118
+ host : elasticsearch.default.svc.cluster.local
119
+ port : 9200
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments