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 setting extra configuration keys in the [SERVICE] block #655

Closed
wants to merge 1 commit into from

Conversation

vsimon
Copy link

@vsimon vsimon commented Dec 9, 2021

Fixes #510

Fixes #559

Issue

#510

#559

Description of changes

Adds the ability to set configuration keys in the [SERVICE] block of fluent-bit.conf. Maintains backward compatibility with existing values.yaml files.

Checklist

  • [ X] Added/modified documentation as required (such as the README.md for modified charts)
  • [ X] Incremented the chart version in Chart.yaml for the modified chart(s)
  • [ X] Manually tested. Describe what testing was done in the testing section below
  • [ X] Make sure the title of the PR is a good description that can go into the release notes

Testing

Updated local chart to use this branch.

  1. No changes to values.yaml. Helm apply produced no change to the configmap.

  2. Updated values.yaml with extraKeys

    service:
      extraKeys: |
        HTTP_Server  On

Helm apply added the following parts (+)

  # Source: aws-for-fluent-bit/templates/configmap.yaml
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: aws-for-fluent-bit
    namespace: aws-for-fluent-bit
    labels:
      helm.sh/chart: aws-for-fluent-bit-0.1.11
      app.kubernetes.io/name: aws-for-fluent-bit
      app.kubernetes.io/instance: aws-for-fluent-bit
      app.kubernetes.io/version: "2.13.0"
      app.kubernetes.io/managed-by: Helm
  data:
    fluent-bit.conf: |
      [SERVICE]
          Parsers_File /fluent-bit/parsers/parsers.conf
+         HTTP_Server  On
+

      [INPUT]
          Name              tail
          Tag               kube.*
          Path              /var/log/containers/*.log
          DB                /var/log/flb_kube.db
          Parser            docker
          Docker_Mode       On
          Mem_Buf_Limit     5MB
          Skip_Long_Lines   On
          Refresh_Interval  10
  1. Updated values.yaml with extraKeys and extraParsers at the same time
    service:
      extraKeys: |
        HTTP_Server  On
      extraParsers: |
        [PARSER]
            Name   logfmt
            Format logfmt

Helm apply added the following parts (+)

  # Source: aws-for-fluent-bit/templates/configmap.yaml
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: aws-for-fluent-bit
    namespace: aws-for-fluent-bit
    labels:
      helm.sh/chart: aws-for-fluent-bit-0.1.11
      app.kubernetes.io/name: aws-for-fluent-bit
      app.kubernetes.io/instance: aws-for-fluent-bit
      app.kubernetes.io/version: "2.13.0"
      app.kubernetes.io/managed-by: Helm
  data:
    fluent-bit.conf: |
      [SERVICE]
          Parsers_File /fluent-bit/parsers/parsers.conf
+         Parsers_File /fluent-bit/etc/parser_extra.conf
+         HTTP_Server  On
+

      [INPUT]
          Name              tail
          Tag               kube.*
          Path              /var/log/containers/*.log
          DB                /var/log/flb_kube.db
          Parser            docker
          Docker_Mode       On
          Mem_Buf_Limit     5MB
          Skip_Long_Lines   On
          Refresh_Interval  10

      [OUTPUT]
          Name                  cloudwatch
          Match                 *
          region                us-east-1
          log_retention_days    365
          auto_create_group     true
+   parser_extra.conf: |-
+     [PARSER]
+         Name   logfmt
+         Format logfmt

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vsimon vsimon changed the title Support setting extra configuration keys in the [SERVICE] block [aws-for-fluent-bit] Support setting extra configuration keys in the [SERVICE] block Dec 9, 2021
@vsimon
Copy link
Author

vsimon commented Dec 19, 2021

gentle ping @hossain-rayhan @PettitWesley

@vsimon
Copy link
Author

vsimon commented Feb 1, 2022

gentle ping @hossain-rayhan @PettitWesley

Would any you know who has permissions to merge PRs?

@vsimon vsimon closed this Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants