-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added side car containers- log capture, log rotator and fluentbit
- Loading branch information
Showing
5 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: fluent-bit-config | ||
namespace: c53ff1-dev | ||
data: | ||
fluent-bit.conf: | | ||
[SERVICE] | ||
Flush 5 | ||
Daemon Off | ||
Parsers_File /var/log/parsers.conf | ||
Log_Level info | ||
HTTP_Server On | ||
HTTP_Listen 0.0.0.0 | ||
HTTP_Port 2020 | ||
Storage_Type filesystem | ||
[INPUT] | ||
Name tail | ||
Path /var/log/oc-cif-test.log | ||
Tag oc-cif-test | ||
Mem_Buf_Limit 5MB | ||
DB /var/log/flb_kube.db | ||
Refresh_Interval 10 | ||
Rotate_Wait 5 | ||
Ignore_Older 24h | ||
[OUTPUT] | ||
Name es | ||
Match * | ||
Host elasticsearch.9212c9-tools.svc.cluster.local | ||
Port 9200 | ||
Index ciif-logs | ||
Logstash_Prefix ciif-logs | ||
Logstash_DateFormat %Y.%m.%d | ||
Logstash_Format On | ||
Retry_Limit False | ||
Suppress_Type_Name On | ||
Type _doc | ||
Time_Key @timestamp | ||
Time_Key_Format iso8601 | ||
parsers.conf: | | ||
[PARSER] | ||
Name json | ||
Format json | ||
Time_Key timestamp | ||
Decode_Field_as escaped_utf8 log do_next | ||
Decode_Field_as json log |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: pod-logger-role | ||
namespace: c53ff1-dev | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods"] | ||
verbs: ["get", "list"] | ||
- apiGroups: [""] | ||
resources: ["pods/logs"] | ||
verbs: ["get", "list"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: pod-logger-rolebinding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: pod-logger | ||
namespace: c53ff1-dev | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: pod-logger-role |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: pod-logger # Name of the service account | ||
namespace: c53ff1-dev |