---
apiVersion: v1
kind: ConfigMap
metadata:
  name: fluent-bit-config
  namespace: log
  labels:
    app: fluent-bit-go-s3
    version: v0.6.2
data:
  fluent-bit-s3.conf: |
    [SERVICE]
        # Flush
        # =====
        # Set an interval of seconds before to flush records to a destination
        Flush        5

        # Daemon
        # ======
        # Instruct Fluent Bit to run in foreground or background mode.
        Daemon       Off

        # Log_Level
        # =========
        # Set the verbosity level of the service, values can be:
        #
        # - error
        # - warning
        # - info
        # - debug
        # - trace
        #
        # By default 'info' is set, that means it includes 'error' and 'warning'.
        Log_Level    info

        # HTTP Server
        # ===========
        # Enable/Disable the built-in HTTP Server for metrics
        HTTP_Server  Off
        HTTP_Listen  0.0.0.0
        HTTP_Port    2020

    [INPUT]
        Name forward
        Tag  s3.message
        # Interval Sec
        # ====
        # Read interval (sec) Default: 1
        Interval_Sec 1

    [OUTPUT]
        Name s3
        Match *
        AccessKeyID     AKIAXYOURAWSACCESSKEY
        SecretAccessKey yoursecretaccesskey
        Bucket          fluent-bit-k8s
        S3Prefix fluent-bit
        Region us-east-1
        Compress gzip
        AutoCreateBucket true
        LogLevel info
        TimeZone Asia/Tokyo
