From f50bf7aad1403da4fbbe8bdc36ed072d5baa24b0 Mon Sep 17 00:00:00 2001 From: Xudong Sun Date: Wed, 2 Aug 2023 14:51:51 -0500 Subject: [PATCH] Update CRD and CR yaml files Signed-off-by: Xudong Sun --- deploy/fluent/crd.yaml | 10 +++++--- deploy/fluent/fluentbit.yaml | 49 +++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/deploy/fluent/crd.yaml b/deploy/fluent/crd.yaml index 731d97235..ffd6435ff 100644 --- a/deploy/fluent/crd.yaml +++ b/deploy/fluent/crd.yaml @@ -8,7 +8,8 @@ spec: categories: [] kind: FluentBit plural: fluentbits - shortNames: [] + shortNames: + - fb singular: fluentbit scope: Namespaced versions: @@ -20,10 +21,13 @@ spec: properties: spec: properties: - config: + fluentBitConfig: + type: string + parsersConfig: type: string required: - - config + - fluentBitConfig + - parsersConfig type: object required: - spec diff --git a/deploy/fluent/fluentbit.yaml b/deploy/fluent/fluentbit.yaml index 93b2071df..e7478a22c 100644 --- a/deploy/fluent/fluentbit.yaml +++ b/deploy/fluent/fluentbit.yaml @@ -4,4 +4,51 @@ metadata: name: fluent-bit namespace: default spec: - config: whatever + fluentBitConfig: | + [Service] + Parsers_File parsers.conf + [Input] + Name tail + Path /var/log/containers/*.log + Exclude_Path /var/log/containers/utils_default_utils-*.log + Refresh_Interval 10 + Skip_Long_Lines true + DB /fluent-bit/tail/pos.db + DB.Sync Normal + Mem_Buf_Limit 5MB + Parser docker + Tag kube.* + [Filter] + Name kubernetes + Match kube.* + Kube_URL https://kubernetes.default.svc:443 + Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token + Labels false + Annotations false + [Filter] + Name nest + Match kube.* + Operation lift + Nested_under kubernetes + Add_prefix kubernetes_ + [Filter] + Name modify + Match kube.* + Remove stream + Remove kubernetes_pod_id + Remove kubernetes_host + Remove kubernetes_container_hash + [Filter] + Name nest + Match kube.* + Operation nest + Wildcard kubernetes_* + Nest_under kubernetes + Remove_prefix kubernetes_ + [Output] + Name kafka + Match_Regex (?:kube|service)\.(.*) + Brokers my-cluster-kafka-brokers.kafka.svc:9092 + Topics fluent-log + parsersConfig: ""