Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve doc for containerd/cri-o setup #1485

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions fluentd-daemonset-elasticsearch-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@ spec:
value: "elastic"
- name: FLUENT_ELASTICSEARCH_PASSWORD
value: "changeme"
# Exclude Fluentd logs' to avoid an infine loop
# ================================================================
- name: FLUENT_CONTAINER_TAIL_EXCLUDE_PATH
value: "/var/log/pods/fluent*"
# Option to configure containerd/cri-o log format
# ================================================================
- name: FLUENT_CONTAINER_TAIL_PARSER_TYPE
value: "cri"
# Option to configure containerd date time log format
# ================================================================
- name: FLUENT_CONTAINER_TAIL_PARSER_TIME_FORMAT
value: "%Y-%m-%dT%H:%M:%S.%N%:z"
# Logz.io Authentication
# ======================
- name: LOGZIO_TOKEN
value: "ThisIsASuperLongToken"
- name: LOGZIO_LOGTYPE
value: "kubernetes"
resources:
limits:
memory: 200Mi
Expand Down
12 changes: 12 additions & 0 deletions fluentd-daemonset-elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ spec:
value: "elastic"
- name: FLUENT_ELASTICSEARCH_PASSWORD
value: "changeme"
# Exclude Fluentd logs' to avoid an infine loop
# ================================================================
- name: FLUENT_CONTAINER_TAIL_EXCLUDE_PATH
value: "/var/log/pods/fluent*"
# Option to configure containerd/cri-o log format
# ================================================================
- name: FLUENT_CONTAINER_TAIL_PARSER_TYPE
value: "cri"
# Option to configure containerd date time log format
# ================================================================
- name: FLUENT_CONTAINER_TAIL_PARSER_TIME_FORMAT
value: "%Y-%m-%dT%H:%M:%S.%N%:z"
# Logz.io Authentication
# ======================
- name: LOGZIO_TOKEN
Expand Down
10 changes: 8 additions & 2 deletions fluentd-daemonset-opensearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,16 @@ spec:
value: "/path/to/file.key"
- name: FLUENT_OPENSEARCH_CLIENT_KEY_PASS
value: "changeme"
# Fluentd Parser
# =====================
# Exclude Fluentd logs' to avoid an infine loop
# ================================================================
- name: FLUENT_CONTAINER_TAIL_EXCLUDE_PATH
value: "/var/log/pods/fluent*"
# Option to configure containerd/cri-o log format
# ================================================================
- name: FLUENT_CONTAINER_TAIL_PARSER_TYPE
value: "cri"
# Option to configure containerd date time log format
# ================================================================
- name: FLUENT_CONTAINER_TAIL_PARSER_TIME_FORMAT
value: "%Y-%m-%dT%H:%M:%S.%N%:z"
resources:
Expand Down
8 changes: 8 additions & 0 deletions templates/README.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ You can use `cri` parser by overwriting `tail_container_parse.conf` via ConfigMa
</parse>
```

Or by setting environment variables `FLUENT_CONTAINER_TAIL_PARSER_TYPE` and/or `FLUENT_CONTAINER_TAIL_PARSER_TIME_FORMAT` according to your setup.
```
- name: FLUENT_CONTAINER_TAIL_PARSER_TYPE
value: "cri"
- name: FLUENT_CONTAINER_TAIL_PARSER_TIME_FORMAT
value: "%Y-%m-%dT%H:%M:%S.%N%:z"
```

See also [CRI parser README](https://github.com/fluent/fluent-plugin-parser-cri#log-and-configuration-example)

### Use FLUENT_CONTAINER_TAIL_PATH to change container logs folder
Expand Down