You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,12 @@
1
1
# Change Log
2
2
3
+
## 2022-08-30
4
+
### Added
5
+
- Helm chart templatisation/parameterisation to provide granular level control on the chart and its values.
6
+
- Support for custom ServiceAccount.
7
+
### Breaking Changes
8
+
- If you have not modified any of the templates values.yaml for any customisation including custom Fluentd configuration etc., then upgrading to this version is a non breaking change. In case, if you have any modifications or customisations, then you may need to adjust those according to the new templatisation format before upgrading to this version.
9
+
3
10
## 2022-07-13
4
11
### Added
5
12
- Collection support for StatefulSet, Job and CronJob objects.
Copy file name to clipboardExpand all lines: README.md
+81-3Lines changed: 81 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,11 +271,38 @@ This approach works for all the use-cases, except for multi-line plain text form
271
271
- oracle.com/oci_la_log_group_id => to use custom logGroupId (oci_la_log_group_id)
272
272
- oracle.com/oci_la_entity_id => to use custom entityId (oci_la_entity_id)
273
273
274
+
#### Through customLogs section
275
+
276
+
In this approach, all that you need to do is to provide the necessary configuration information like log file path, logSource, multiline start regular expression (in case of multi-line logs) in the customLogs section of values.yaml.
277
+
Using this information the corresponding Fluentd configuration is generated automatically.
278
+
279
+
**Note** This approach is valid only when using helm chart based installation.
280
+
281
+
The following example demonstrates a container customLogs configuration
282
+
```
283
+
#custom-id1:
284
+
#path: /var/log/containers/custom*.log
285
+
#ociLALogSourceName: "Custom1 Logs"
286
+
#multilineStartRegExp:
287
+
# Set isContainerLog to false if the log is not a container log (/var/log/containers/*.log). Default value is true.
288
+
#isContainerLog: true
289
+
```
290
+
291
+
The following example demonstrates a non container customLogs configuration
292
+
```
293
+
#custom-id2:
294
+
#path: /var/log/custom/*.log
295
+
#ociLALogSourceName: "Custom2 Logs"
296
+
#multilineStartRegExp:
297
+
# Set isContainerLog to false if the log is not a container log (/var/log/containers/*.log). Default value is true.
298
+
#isContainerLog: false
299
+
```
300
+
274
301
#### Through Custom Fluentd conf
275
302
276
-
In this approach, a new set of Source, Filter sections have to be created in the fluentd config.
303
+
In this approach, a new set of Source, Filter sections have to be created in the customFluentdConf section of values.yaml.
277
304
The following example demonstrates a custom fluentd config to tag /var/log/containers/frontend*.log with logSource "Guestbook Frontend Logs"
278
-
(*to be added to helm-chart values.yaml, under fluentd:configMapLogsFiles:kubernetes.conf value if using helm chart OR to either of configmap-cri.yaml / configmap-docker.yaml if using kubectl approach).
305
+
(*to be added to helm-chart values.yaml, under customFluentdConf section if using helm chart OR to either of configmap-cri.yaml / configmap-docker.yaml if using kubectl approach).
279
306
280
307
```
281
308
<source>
@@ -314,4 +341,55 @@ The following example demonstrates a custom fluentd config to tag /var/log/conta
314
341
**Note**: The log path */var/log/containers/frontend-*.log* has to be excluded from the generic container logs to avoid duplicate log collection. Add the log path to *exclude_path* value under *in_tail_containerlogs* source section.
315
342
316
343
In addition to the above, you may need to modify the source section to add *multiline* parser, if the logs are of plain text multi-line format (OR) add a concat plugin filter if the logs are of say multi-line but wrapped in json.
317
-
Refer OOB fluentd config in the helm-cahrt values.yaml for examples.
344
+
Refer OOB fluentd config in the helm-chart values.yaml for examples.
345
+
346
+
347
+
### How to use your own ServiceAccount ?
348
+
349
+
**Note**: This is supported only through the helm chart based deployment.
350
+
351
+
By default, a cluster role, cluster role binding and serviceaccount will be created for the Fluentd pods to access (readonly) various objects within the cluster for supporting logs and objects collection. However, if you want to use your own serviceaccount, you can do the same by setting the "createServiceAccount" variable to false and providing your own serviceaccount in the "serviceAccount" variable. Ensure that the serviceaccount should be in the same namespace as the namespace used for the whole deployment. The namespace for the whole deployment can be set using the "namespace" variable, whose default value is "kube-system".
352
+
353
+
The serviceaccount must be binded to a cluster role defined in your cluster, which allows access to various objects metadata. The following sample is a recommended minimalistic role definition as of chart version 2.0.0.
354
+
355
+
```
356
+
apiVersion: rbac.authorization.k8s.io/v1
357
+
kind: ClusterRole
358
+
metadata:
359
+
name: oci-la-fluentd-generic-clusterrole
360
+
rules:
361
+
- apiGroups:
362
+
- ""
363
+
resources:
364
+
- '*'
365
+
verbs:
366
+
- get
367
+
- list
368
+
- watch
369
+
- apiGroups:
370
+
- apps
371
+
- batch
372
+
resources:
373
+
- '*'
374
+
verbs:
375
+
- get
376
+
- list
377
+
- watch
378
+
```
379
+
380
+
Once you have the cluster role defined, to bind the cluster role to your serviceaccount use the following cluster role binding definition.
0 commit comments