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

[aws-for-fluent-bit] Support extra Configuration to the pods #669

Open
wants to merge 3 commits 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
2 changes: 1 addition & 1 deletion stable/aws-for-fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: aws-for-fluent-bit
description: A Helm chart to deploy aws-for-fluent-bit project
version: 0.1.11
version: 0.1.13
appVersion: 2.13.0
home: https://github.com/aws/eks-charts
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
Expand Down
10 changes: 6 additions & 4 deletions stable/aws-for-fluent-bit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ helm delete aws-for-fluent-bit --namespace kube-system
| `imagePullSecrets` | Docker registry pull secret | `[]` |
| `serviceAccount.create` | Whether a new service account should be created | `true` |
| `serviceAccount.name` | Name of the service account | `aws-for-fluent-bit` |
| `serviceAccount.create` | Whether a new service account should be created | `true` |
| `serviceAccount.create` | Whether a new service account should be created | `true` |
| `service.parsersFiles` | List of available parser files | `/fluent-bit/parsers/parsers.conf` |
| `service.extraKeys` | Adding more configuration keys to the service section | `""` |
| `service.extraParsers` | Adding more parsers with this value | `""` |
| `input.*` | Values for Kubernetes input | |
| `extraInputs` | Adding more inputs with this value | `""` |
Expand Down Expand Up @@ -68,9 +69,9 @@ helm delete aws-for-fluent-bit --namespace kube-system
| `kinesis.match` | The log filter | `"*"` | ✔
| `kinesis.region` | The region which your Kinesis Data Stream is in. | `"us-east-1"` | ✔
| `kinesis.stream` | The name of the Kinesis Data Stream that you want log records sent to. | `"my-kinesis-stream-name"` | ✔
| `kinesis.partitionKey` | A partition key is used to group data by shard within a stream. A Kinesis Data Stream uses the partition key that is associated with each data record to determine which shard a given data record belongs to. For example, if your logs come from Docker containers, you can use container_id as the partition key, and the logs will be grouped and stored on different shards depending upon the id of the container they were generated from. As the data within a shard are coarsely ordered, you will get all your logs from one container in one shard roughly in order. If you don't set a partition key or put an invalid one, a random key will be generated, and the logs will be directed to random shards. If the partition key is invalid, the plugin will print an warning message. | `"container_id"` |
| `kinesis.appendNewline` | If you set append_newline as true, a newline will be addded after each log record. | |
| `kinesis.replaceDots` | Replace dot characters in key names with the value of this option. | |
| `kinesis.partitionKey` | A partition key is used to group data by shard within a stream. A Kinesis Data Stream uses the partition key that is associated with each data record to determine which shard a given data record belongs to. For example, if your logs come from Docker containers, you can use container_id as the partition key, and the logs will be grouped and stored on different shards depending upon the id of the container they were generated from. As the data within a shard are coarsely ordered, you will get all your logs from one container in one shard roughly in order. If you don't set a partition key or put an invalid one, a random key will be generated, and the logs will be directed to random shards. If the partition key is invalid, the plugin will print an warning message. | `"container_id"` |
| `kinesis.appendNewline` | If you set append_newline as true, a newline will be addded after each log record. | |
| `kinesis.replaceDots` | Replace dot characters in key names with the value of this option. | |
| `kinesis.dataKeys` | By default, the whole log record will be sent to Kinesis. If you specify key name(s) with this option, then only those keys and values will be sent to Kinesis. For example, if you are using the Fluentd Docker log driver, you can specify data_keys log and only the log message will be sent to Kinesis. If you specify multiple keys, they should be comma delimited. | |
| `kinesis.roleArn` | ARN of an IAM role to assume (for cross account access). | |
| `kinesis.endpoint` | Specify a custom endpoint for the Kinesis Streams API. | |
Expand All @@ -93,6 +94,7 @@ helm delete aws-for-fluent-bit --namespace kube-system
| `updateStrategy` | Optional update strategy | `type: RollingUpdate` |
| `affinity` | Map of node/pod affinities | `{}` |
| `env` | Optional List of pod environment variables for the pods | `[]` |
| `extraContainerConfig` | Optional Extra pod configurations variables |
| `tolerations` | Optional deployment tolerations | `[]` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `annotations` | Optional pod annotations | `{}` |
Expand Down
4 changes: 4 additions & 0 deletions stable/aws-for-fluent-bit/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ data:
Parsers_File /fluent-bit/etc/parser_extra.conf
{{- end }}

{{- if .Values.service.extraKeys }}
{{ .Values.service.extraKeys | indent 8}}
{{- end }}

[INPUT]
Name tail
Tag {{ .Values.input.tag }}
Expand Down
3 changes: 3 additions & 0 deletions stable/aws-for-fluent-bit/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ spec:
- name: {{ .Chart.Name }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- if .Values.extraContainerConfig }}
{{- toYaml .Values.extraContainerConfig | nindent 10 }}
{{- end }}
{{- if .Values.env }}
env:
{{- toYaml .Values.env | nindent 12 }}
Expand Down
12 changes: 10 additions & 2 deletions stable/aws-for-fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ fullnameOverride: ""
service:
parsersFiles:
- /fluent-bit/parsers/parsers.conf
# extraKeys: |
# HTTP_Server On
# extraParsers: |
# [PARSER]
# Name logfmt
# Format logfmt

extraContainerConfig: {}
# ports:
# - containerPort: 2020
# name: metrics
# protocol: TCP

input:
tag: "kube.*"
path: "/var/log/containers/*.log"
Expand Down Expand Up @@ -139,7 +147,7 @@ affinity: {}

annotations: {}
# iam.amazonaws.com/role: arn:aws:iam::123456789012:role/role-for-fluent-bit

env: []
## To add extra environment variables to the pods, add as below
# env:
Expand All @@ -157,7 +165,7 @@ env: []
# valueFrom:
# fieldRef:
# fieldPath: spec.nodeName


volumes:
- name: varlog
Expand Down