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

(feat)! : outdated aws-for-fluent-bit chart updated to use new high performance cloudwatch_logs plugin #903

Merged
merged 22 commits into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5241997
feat: Updated to use new high performance cloudwatch plugin
deepend-dev Feb 19, 2023
e0bcd84
fix: removed json function
deepend-dev Feb 19, 2023
e219d55
Merge branch 'aws:master' into master
deepend-dev Feb 24, 2023
4a63854
feat: updated chart to support s3 and opensearch
deepend-dev Feb 25, 2023
c98f6d2
fix: updated readme to reflect correct repo
deepend-dev Feb 25, 2023
6334169
fix: updated readme to reflect correct repo
deepend-dev Feb 25, 2023
e3484c4
fix: updated opensearch values
deepend-dev Feb 25, 2023
8cb0231
Merge branch 'aws:master' into master
deepend-dev Feb 28, 2023
6a894d0
Updated as per the review
deepend-dev Mar 10, 2023
2ddf3f2
Merge branch 'master' into feat-update-fluent-bit-chart
deepend-dev Mar 10, 2023
acc815b
Merge pull request #1 from deepend-dev/feat-update-fluent-bit-chart
deepend-dev Mar 10, 2023
4376553
fix: corrected app version
deepend-dev Mar 10, 2023
4eaed53
fix: updated doc
deepend-dev Mar 11, 2023
ec32cf1
fix: corrected typos
deepend-dev Mar 11, 2023
08d697b
fix: updated chart
deepend-dev Mar 14, 2023
3445dcc
update!:only cloudwatch_logs will be enabled as default
deepend-dev Mar 14, 2023
1455401
update!:only cloudwatch_logs will be enabled as default
deepend-dev Mar 14, 2023
e2cccab
fix: updating upload_chunk size for S3
deepend-dev Mar 14, 2023
a4e64ef
fix: update readme
deepend-dev Mar 14, 2023
99cfd1c
fix: update readme
deepend-dev Mar 14, 2023
52a27d2
Merge branch 'aws:master' into master
deepend-dev Mar 18, 2023
bba1bd4
fix: readme updated for new fluent bit version
deepend-dev Mar 18, 2023
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ helm repo add eks https://aws.github.io/eks-charts
* [aws-cloudwatch-metrics](stable/aws-cloudwatch-metrics): A helm chart for CloudWatch Agent to Collect Cluster Metrics

### AWS for Fluent Bit
* [aws-for-fluent-bit](stable/aws-for-fluent-bit): A helm chart for [AWS-for-fluent-bit](https://github.com/aws/aws-for-fluent-bit)
* [aws-for-fluent-bit](stable/aws-for-fluent-bit): A helm chart for [AWS-for-fluent-bit](https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit)
deepend-dev marked this conversation as resolved.
Show resolved Hide resolved

### AWS Load Balancer Controller
* [aws-load-balancer-controller](stable/aws-load-balancer-controller): A helm chart for [AWS Load Balancer Controller](https://github.com/kubernetes-sigs/aws-load-balancer-controller)
Expand Down
4 changes: 2 additions & 2 deletions stable/aws-for-fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: aws-for-fluent-bit
description: A Helm chart to deploy aws-for-fluent-bit project
version: 0.1.23
appVersion: 2.21.5
version: 0.1.24
appVersion: 2.31.2
home: https://github.com/aws/eks-charts
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
Expand Down
12 changes: 9 additions & 3 deletions stable/aws-for-fluent-bit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,25 @@ helm delete aws-for-fluent-bit --namespace kube-system
| `filter.*` | Values for kubernetes filter | |
| `filter.extraFilters` | Append to existing filter with value |
| `additionalFilters` | Adding more filters with value |
| `cloudWatch.enabled` | Whether this plugin should be enabled or not [details](https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit) | `true` | ✔
| `cloudWatch.enabled` | Whether this plugin should be enabled or not [details](https://docs.fluentbit.io/manual/pipeline/outputs/cloudwatch) | `true` | ✔
deepend-dev marked this conversation as resolved.
Show resolved Hide resolved
| `cloudWatch.match` | The log filter | `*` | ✔
| `cloudWatch.region` | The AWS region for CloudWatch. | `us-east-1` | ✔
| `cloudWatch.logGroupName` | The name of the CloudWatch Log Group that you want log records sent to. | `"/aws/eks/fluentbit-cloudwatch/logs"` | ✔
| `cloudWatch.logGroupTemplate` | Template for Log Group name using Fluent Bit record_accessor syntax. This field is optional and if configured it overrides the logGroupName. If the template translation fails, an error is logged and the logGroupName (which is still required) is used instead. | |
| `cloudWatch.logStreamName` | The name of the CloudWatch Log Stream that you want log records sent to. | |
| `cloudWatch.logStreamPrefix` | Prefix for the Log Stream name. The tag is appended to the prefix to construct the full log stream name. Not compatible with the log_stream_name option. | `"fluentbit-"` |
| `cloudWatch.logStreamTemplate` | Template for Log Stream name using Fluent Bit record_accessor syntax. This field is optional and if configured it overrides the other log stream options. If the template translation fails, an error is logged and the log_stream_name or log_stream_prefix are used instead (and thus one of those fields is still required to be configured). | |
| `cloudWatch.logKey` | By default, the whole log record will be sent to CloudWatch. If you specify a key name with this option, then only the value of that key will be sent to CloudWatch. For example, if you are using the Fluentd Docker log driver, you can specify logKey log and only the log message will be sent to CloudWatch. | |
| `cloudWatch.logRetentionDays` | If set to a number greater than zero, and newly create log group's retention policy is set to this many days. | |
| `cloudWatch.logFormat` | An optional parameter that can be used to tell CloudWatch the format of the data. A value of json/emf enables CloudWatch to extract custom metrics embedded in a JSON payload. See the Embedded Metric Format. | |
| `cloudWatch.roleArn` | ARN of an IAM role to assume (for cross account access). | |
| `cloudWatch.autoCreateGroup` | Automatically create the log group. Valid values are "true" or "false" (case insensitive). | true |
| `cloudWatch.logRetentionDays` | If set to a number greater than zero, and newly create log group's retention policy is set to this many days. | |
| `cloudWatch.endpoint` | Specify a custom endpoint for the CloudWatch Logs API. | |
| `cloudWatch.credentialsEndpoint` | Specify a custom HTTP endpoint to pull credentials from. [more info](https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit) | |
| `cloudWatch.metricNamespace` | An optional string representing the CloudWatch namespace for the metrics. | |
| `cloudWatch.metricDimensions` | A list of lists containing the dimension keys that will be applied to all metrics. If you have only one list of dimensions, put the values as a comma separated string. If you want to put list of lists, use the list as semicolon separated strings. | |
| `cloudWatch.stsEndpoint` | Specify a custom STS endpoint for the AWS STS API. | |
| `cloudWatch.autoRetryRequests` | Immediately retry failed requests to AWS services once. This option does not affect the normal Fluent Bit retry mechanism with backoff. Instead, it enables an immediate retry with no delay for networking errors, which may help improve throughput when there are transient/random networking issues. This option defaults to true. | |
| `cloudWatch.externalId` | Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. | |
| `cloudWatch.extraOutputs` | Append extra outputs with value | `""` |
| `firehose.enabled` | Whether this plugin should be enabled or not, [details](https://github.com/aws/amazon-kinesis-firehose-for-fluent-bit) | `true` | ✔
| `firehose.match` | The log filter | `"*"` | ✔
Expand Down
30 changes: 24 additions & 6 deletions stable/aws-for-fluent-bit/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,36 +63,54 @@ data:

{{- if .Values.cloudWatch.enabled }}
[OUTPUT]
Name cloudwatch
Name cloudwatch_logs
Match {{ .Values.cloudWatch.match }}
region {{ .Values.cloudWatch.region }}
log_group_name {{ .Values.cloudWatch.logGroupName }}
{{- if .Values.cloudWatch.logGroupTemplate }}
log_group_template {{ .Values.cloudWatch.logGroupTemplate }}
{{- end }}
{{- if .Values.cloudWatch.logStreamName }}
log_stream_name {{ .Values.cloudWatch.logStreamName }}
{{- end }}
{{- if .Values.cloudWatch.logStreamPrefix }}
log_stream_prefix {{ .Values.cloudWatch.logStreamPrefix }}
{{- end }}
{{- if .Values.cloudWatch.logStreamTemplate }}
log_stream_template {{ .Values.cloudWatch.logStreamTemplate }}
{{- end }}
{{- if .Values.cloudWatch.logKey }}
log_key {{ .Values.cloudWatch.logKey }}
{{- end }}
{{- if .Values.cloudWatch.logFormat }}
log_format {{ .Values.cloudWatch.logFormat }}
{{- end }}
{{- if .Values.cloudWatch.logRetentionDays }}
log_retention_days {{ .Values.cloudWatch.logRetentionDays }}
{{- end }}
{{- if .Values.cloudWatch.roleArn }}
role_arn {{ .Values.cloudWatch.roleArn }}
{{- end }}
{{- if .Values.cloudWatch.autoCreateGroup }}
auto_create_group {{ .Values.cloudWatch.autoCreateGroup }}
{{- end }}
{{- if .Values.cloudWatch.logRetentionDays }}
log_retention_days {{ .Values.cloudWatch.logRetentionDays }}
{{- end }}
{{- if .Values.cloudWatch.endpoint }}
endpoint {{ .Values.cloudWatch.endpoint }}
{{- end }}
{{- if .Values.cloudWatch.credentialsEndpoint }}
credentials_endpoint {{ toJson .Values.cloudWatch.credentialsEndpoint }}
{{- if .Values.cloudWatch.metricNamespace }}
metric_namespace {{ .Values.cloudWatch.metricNamespace }}
{{- end }}
{{- if .Values.cloudWatch.metricDimensions }}
metric_dimensions {{ .Values.cloudWatch.metricDimensions }}
{{- end }}
{{- if .Values.cloudWatch.stsEndpoint }}
sts_endpoint {{ .Values.cloudWatch.stsEndpoint }}
{{- end }}
{{- if .Values.cloudWatch.autoRetryRequests }}
auto_retry_requests {{ .Values.cloudWatch.autoRetryRequests }}
{{- end -}}
{{- if .Values.cloudWatch.externalId }}
external_id {{ .Values.cloudWatch.externalId }}
{{- end -}}
{{- if .Values.cloudWatch.extraOutputs }}
{{ .Values.cloudWatch.extraOutputs | indent 8 }}
Expand Down
21 changes: 13 additions & 8 deletions stable/aws-for-fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ global:

image:
repository: public.ecr.aws/aws-observability/aws-for-fluent-bit
tag: 2.21.5
tag: 2.31.2
deepend-dev marked this conversation as resolved.
Show resolved Hide resolved
pullPolicy: IfNotPresent

imagePullSecrets: []
Expand All @@ -14,7 +14,6 @@ fullnameOverride: ""
rbac:
# rbac.pspEnabled, if `true` a restricted pod security policy is created and used
pspEnabled: false

service:
## Allow the service to be exposed for monitoring
## https://docs.fluentbit.io/manual/administration/monitoring
Expand Down Expand Up @@ -81,17 +80,24 @@ cloudWatch:
match: "*"
region: "us-east-1"
logGroupName: "/aws/eks/fluentbit-cloudwatch/logs"
logGroupTemplate:
logStreamName:
logStreamPrefix: "fluentbit-"
logStreamTemplate:
logKey:
logFormat:
logRetentionDays:
roleArn:
autoCreateGroup: true
logRetentionDays:
endpoint:
credentialsEndpoint: {}
metricNamespace:
metricDimensions:
stsEndpoint:
autoRetryRequests:
externalId:
# extraOutputs: |
# ...
# log_format json/emf
# worker 1

firehose:
enabled: true
Expand Down Expand Up @@ -171,7 +177,8 @@ tolerations: []

affinity: {}

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

# Specifies if aws-for-fluent-bit should be started in hostNetwork mode.
Expand Down Expand Up @@ -203,7 +210,6 @@ env: []
# fieldRef:
# fieldPath: spec.nodeName


volumes:
- name: varlog
hostPath:
Expand All @@ -219,7 +225,6 @@ volumeMounts:
mountPath: /var/lib/docker/containers
readOnly: true


serviceMonitor:
# service:
# type: ClusterIP
Expand Down