File tree Expand file tree Collapse file tree 11 files changed +78
-231
lines changed Expand file tree Collapse file tree 11 files changed +78
-231
lines changed Original file line number Diff line number Diff line change 10
10
MARKLOGIC_FQDN_SUFFIX : {{ include "marklogic.headlessURL" . }}
11
11
MARKLOGIC_INIT : " true"
12
12
MARKLOGIC_JOIN_CLUSTER : " true"
13
+ ---
14
+ apiVersion : v1
15
+ kind : ConfigMap
16
+ metadata :
17
+ name : fluentd-config
18
+ namespace : {{ .Release.Namespace }}
19
+ labels :
20
+ kubernetes.io/cluster-service : " true"
21
+ 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>
69
+
Original file line number Diff line number Diff line change @@ -96,15 +96,35 @@ 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
108
+ volumeMounts :
109
+ - name : datadir
110
+ mountPath : {{ .Values.persistence.mountPath }}
111
+ {{- if .Values.extraVolumeMounts }}
112
+ {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
113
+ {{- end }}
114
+ - name : fdconf
115
+ mountPath : /fluentd/etc/
99
116
dnsConfig :
100
117
searches :
101
118
- {{ include "marklogic.headlessURL" . }}
102
119
{{- if .Values.imagePullSecret }}
103
120
imagePullSecrets :
104
121
- name : {{ include "marklogic.fullname" . }}-registry
105
122
{{- end }}
106
- {{- if or (not .Values.persistence.enabled) (.Values.extraVolumes) }}
107
123
volumes :
124
+ - name : fdconf
125
+ configMap :
126
+ name : fluentd-config
127
+ {{- if or (not .Values.persistence.enabled) (.Values.extraVolumes) }}
108
128
{{- if not .Values.persistence.enabled }}
109
129
- name : datadir
110
130
emptyDir : {}
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
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