From adae49253e6b2b93eac4d861b8cb01a71def393a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Reegn?= Date: Tue, 24 Sep 2024 12:49:02 +0200 Subject: [PATCH] update fluent-operator to v3.2.0 (#553) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update fluent-operator to v3.2.0 Signed-off-by: Zoltán Reegn * fix linter errors Signed-off-by: Zoltán Reegn --------- Signed-off-by: Zoltán Reegn --- charts/fluent-operator/Chart.yaml | 8 +- .../charts/fluent-bit-crds/Chart.yaml | 4 +- .../fluentbit.fluent.io_clusterfilters.yaml | 142 ++++++++++++++++++ .../fluentbit.fluent.io_clusterinputs.yaml | 42 ++++++ .../fluentbit.fluent.io_clusteroutputs.yaml | 78 ++++++++++ .../crds/fluentbit.fluent.io_filters.yaml | 142 ++++++++++++++++++ .../crds/fluentbit.fluent.io_outputs.yaml | 78 ++++++++++ .../charts/fluentd-crds/Chart.yaml | 4 +- .../fluent-operator-clusterRole.yaml | 4 +- .../fluent-operator-clusterRoleBinding.yaml | 4 +- .../templates/fluent-operator-deployment.yaml | 2 + .../templates/fluentbit-fluentBit.yaml | 12 ++ .../templates/fluentbit-lua-config.yaml | 2 + .../templates/serviceaccount.yaml | 4 +- charts/fluent-operator/values.yaml | 81 +++++----- 15 files changed, 560 insertions(+), 47 deletions(-) diff --git a/charts/fluent-operator/Chart.yaml b/charts/fluent-operator/Chart.yaml index df5d477e..c96c502d 100644 --- a/charts/fluent-operator/Chart.yaml +++ b/charts/fluent-operator/Chart.yaml @@ -6,8 +6,8 @@ keywords: - fluent-bit - fluentd - operator -version: 3.1.0 -appVersion: 3.1.0 +version: 3.2.0 +appVersion: 3.2.0 icon: https://raw.githubusercontent.com/fluent/fluent-operator/master/docs/images/fluent-operator-icon.svg home: https://www.fluentd.org/ sources: @@ -18,9 +18,9 @@ maintainers: dependencies: - name: fluent-bit-crds repository: "file://charts/fluent-bit-crds" - version: 3.1.0 + version: 3.2.0 condition: fluentbit.crdsEnable - name: fluentd-crds repository: "file://charts/fluentd-crds" - version: 3.1.0 + version: 3.2.0 condition: fluentd.crdsEnable diff --git a/charts/fluent-operator/charts/fluent-bit-crds/Chart.yaml b/charts/fluent-operator/charts/fluent-bit-crds/Chart.yaml index fd35bcae..66f67316 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/Chart.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/Chart.yaml @@ -5,8 +5,8 @@ keywords: - logging - fluent-bit - operator -version: 3.1.0 -appVersion: "3.1.0" +version: 3.2.0 +appVersion: "3.2.0" sources: - https://github.com/fluent/fluent-operator maintainers: diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml index 320d1762..d98d8044 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml @@ -314,6 +314,94 @@ spec: This could mitigate the Kube API heavy traffic issue for large cluster. type: boolean type: object + logToMetrics: + description: LogToMetrics defines a Log to Metrics Filter configuration. + properties: + addLabel: + description: Add a custom label NAME and set the value to + the value of KEY + items: + type: string + type: array + alias: + description: Alias for the plugin + type: string + bucket: + description: Defines a bucket for histogram + items: + type: string + type: array + discardLogs: + description: |- + Flag that defines if logs should be discarded after processing. This applies + for all logs, no matter if they have emitted metrics or not. + type: boolean + emitterMemBufLimit: + description: set a buffer limit to restrict memory usage + of metrics emitter + type: string + emitterName: + description: Name of the emitter (advanced users) + type: string + exclude: + description: |- + Optional filter for records in which the content of KEY does not matches the regular expression. + Value Format: FIELD REGEX + items: + type: string + type: array + kubernetesMode: + description: |- + If enabled, it will automatically put pod_id, pod_name, namespace_name, docker_id and container_name + into the metric as labels. This option is intended to be used in combination with the kubernetes filter plugin. + type: boolean + labelField: + description: Includes a record field as label dimension + in the metric. + items: + type: string + type: array + metricDescription: + description: Sets a help text for the metric. + type: string + metricMode: + description: Defines the mode for the metric. Valid values + are [counter, gauge or histogram] + type: string + metricName: + description: Sets the name of the metric. + type: string + metricNamespace: + description: Namespace of the metric + type: string + metricSubsystem: + description: Sets a sub-system for the metric. + type: string + regex: + description: |- + Optional filter for records in which the content of KEY matches the regular expression. + Value Format: FIELD REGEX + items: + type: string + type: array + retryLimit: + description: 'RetryLimit describes how many times fluent-bit + should retry to send data to a specific output. If set + to false fluent-bit will try indefinetly. If set to any + integer N>0 it will try at most N+1 times. Leading zeros + are not allowed (values such as 007, 0150, 01 do not work). + If this property is not defined fluent-bit will use the + default value: 1.' + pattern: ^(((f|F)alse)|(no_limits)|(no_retries)|([1-9]+[0-9]*))$ + type: string + tag: + description: Defines the tag for the generated metrics record + type: string + valueField: + description: Specify the record field that holds a numerical + value + type: string + type: object lua: description: Lua defines Lua Filter configuration. properties: @@ -376,6 +464,13 @@ spec: If you desire timestamp precision enabling this option will pass the timestamp as a Lua table with keys sec for seconds since epoch and nsec for nanoseconds. type: boolean + typeArrayKey: + description: |- + If these keys are matched, the fields are handled as array. If more than + one key, delimit by space. It is useful the array can be empty. + items: + type: string + type: array typeIntKey: description: |- If these keys are matched, the fields are converted to integer. @@ -784,6 +879,53 @@ spec: format: int64 type: integer type: object + wasm: + description: Wasm defines a Wasm configuration. + properties: + accessiblePaths: + description: Specify the whitelist of paths to be able to + access paths from WASM programs. + items: + type: string + type: array + alias: + description: Alias for the plugin + type: string + eventFormat: + description: 'Define event format to interact with Wasm + programs: msgpack or json. Default: json' + type: string + functionName: + description: Wasm function name that will be triggered to + do filtering. It's assumed that the function is built + inside the Wasm program specified above. + type: string + retryLimit: + description: 'RetryLimit describes how many times fluent-bit + should retry to send data to a specific output. If set + to false fluent-bit will try indefinetly. If set to any + integer N>0 it will try at most N+1 times. Leading zeros + are not allowed (values such as 007, 0150, 01 do not work). + If this property is not defined fluent-bit will use the + default value: 1.' + pattern: ^(((f|F)alse)|(no_limits)|(no_retries)|([1-9]+[0-9]*))$ + type: string + wasmHeapSize: + description: Size of the heap size of Wasm execution. Review + unit sizes for allowed values. + pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ + type: string + wasmPath: + description: Path to the built Wasm program that will be + used. This can be a relative path against the main configuration + file. + type: string + wasmStackSize: + description: Size of the stack size of Wasm execution. Review + unit sizes for allowed values. + pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ + type: string + type: object type: object type: array logLevel: diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml index 6e0b230b..cdbaaaee 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml @@ -95,6 +95,48 @@ spec: plugin. type: string type: object + execWasi: + description: ExecWasi defines the exec wasi input plugin configuration + properties: + accessiblePaths: + description: Specify the whitelist of paths to be able to access + paths from WASM programs. + items: + type: string + type: array + bufSize: + description: Size of the buffer (check unit sizes for allowed + values) + pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ + type: string + intervalNSec: + description: Polling interval (nanoseconds). + format: int64 + type: integer + intervalSec: + description: Polling interval (seconds). + format: int32 + type: integer + parser: + description: Specify the name of a parser to interpret the entry + as a structured message. + type: string + threaded: + description: 'Indicates whether to run this input in its own thread. + Default: false.' + type: boolean + wasiPath: + description: The place of a WASM program file. + type: string + wasmHeapSize: + pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ + type: string + wasmStackSize: + description: Size of the stack size of Wasm execution. Review + unit sizes for allowed values. + pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ + type: string + type: object fluentBitMetrics: description: FluentBitMetrics defines Fluent Bit Metrics Input configuration. properties: diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml index fae0d975..bea2ab3f 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml @@ -529,6 +529,41 @@ spec: description: Enable AWS Sigv4 Authentication for Amazon ElasticSearch Service. type: string + awsAuthSecret: + description: AWSAuthSecret Enable AWS Sigv4 Authentication for + Amazon ElasticSearch Service. + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + TODO: Add other useful fields. apiVersion, kind, uid? + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object awsExternalID: description: External ID for the AWS IAM Role specified with aws_role_arn. type: string @@ -556,6 +591,42 @@ spec: description: Specify the credentials to use to connect to Elastic's Elasticsearch Service running on Elastic Cloud. type: string + cloudAuthSecret: + description: CloudAuthSecret Specify the credentials to use to + connect to Elastic's Elasticsearch Service running on Elastic + Cloud. + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + TODO: Add other useful fields. apiVersion, kind, uid? + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object cloudID: description: If you are using Elastic's Elasticsearch Service you can specify the cloud_id of the cluster running. @@ -2856,6 +2927,9 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsBodyKeyAttributes: + description: If true, remaining unmatched keys are added as attributes. + type: boolean logsUri: description: 'Specify an optional HTTP URI for the target web server listening for logs, e.g: /v1/logs' @@ -4156,6 +4230,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_filters.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_filters.yaml index 6cc1b5cc..20427043 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_filters.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_filters.yaml @@ -314,6 +314,94 @@ spec: This could mitigate the Kube API heavy traffic issue for large cluster. type: boolean type: object + logToMetrics: + description: LogToMetrics defines a Log to Metrics Filter configuration. + properties: + addLabel: + description: Add a custom label NAME and set the value to + the value of KEY + items: + type: string + type: array + alias: + description: Alias for the plugin + type: string + bucket: + description: Defines a bucket for histogram + items: + type: string + type: array + discardLogs: + description: |- + Flag that defines if logs should be discarded after processing. This applies + for all logs, no matter if they have emitted metrics or not. + type: boolean + emitterMemBufLimit: + description: set a buffer limit to restrict memory usage + of metrics emitter + type: string + emitterName: + description: Name of the emitter (advanced users) + type: string + exclude: + description: |- + Optional filter for records in which the content of KEY does not matches the regular expression. + Value Format: FIELD REGEX + items: + type: string + type: array + kubernetesMode: + description: |- + If enabled, it will automatically put pod_id, pod_name, namespace_name, docker_id and container_name + into the metric as labels. This option is intended to be used in combination with the kubernetes filter plugin. + type: boolean + labelField: + description: Includes a record field as label dimension + in the metric. + items: + type: string + type: array + metricDescription: + description: Sets a help text for the metric. + type: string + metricMode: + description: Defines the mode for the metric. Valid values + are [counter, gauge or histogram] + type: string + metricName: + description: Sets the name of the metric. + type: string + metricNamespace: + description: Namespace of the metric + type: string + metricSubsystem: + description: Sets a sub-system for the metric. + type: string + regex: + description: |- + Optional filter for records in which the content of KEY matches the regular expression. + Value Format: FIELD REGEX + items: + type: string + type: array + retryLimit: + description: 'RetryLimit describes how many times fluent-bit + should retry to send data to a specific output. If set + to false fluent-bit will try indefinetly. If set to any + integer N>0 it will try at most N+1 times. Leading zeros + are not allowed (values such as 007, 0150, 01 do not work). + If this property is not defined fluent-bit will use the + default value: 1.' + pattern: ^(((f|F)alse)|(no_limits)|(no_retries)|([1-9]+[0-9]*))$ + type: string + tag: + description: Defines the tag for the generated metrics record + type: string + valueField: + description: Specify the record field that holds a numerical + value + type: string + type: object lua: description: Lua defines Lua Filter configuration. properties: @@ -376,6 +464,13 @@ spec: If you desire timestamp precision enabling this option will pass the timestamp as a Lua table with keys sec for seconds since epoch and nsec for nanoseconds. type: boolean + typeArrayKey: + description: |- + If these keys are matched, the fields are handled as array. If more than + one key, delimit by space. It is useful the array can be empty. + items: + type: string + type: array typeIntKey: description: |- If these keys are matched, the fields are converted to integer. @@ -784,6 +879,53 @@ spec: format: int64 type: integer type: object + wasm: + description: Wasm defines a Wasm configuration. + properties: + accessiblePaths: + description: Specify the whitelist of paths to be able to + access paths from WASM programs. + items: + type: string + type: array + alias: + description: Alias for the plugin + type: string + eventFormat: + description: 'Define event format to interact with Wasm + programs: msgpack or json. Default: json' + type: string + functionName: + description: Wasm function name that will be triggered to + do filtering. It's assumed that the function is built + inside the Wasm program specified above. + type: string + retryLimit: + description: 'RetryLimit describes how many times fluent-bit + should retry to send data to a specific output. If set + to false fluent-bit will try indefinetly. If set to any + integer N>0 it will try at most N+1 times. Leading zeros + are not allowed (values such as 007, 0150, 01 do not work). + If this property is not defined fluent-bit will use the + default value: 1.' + pattern: ^(((f|F)alse)|(no_limits)|(no_retries)|([1-9]+[0-9]*))$ + type: string + wasmHeapSize: + description: Size of the heap size of Wasm execution. Review + unit sizes for allowed values. + pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ + type: string + wasmPath: + description: Path to the built Wasm program that will be + used. This can be a relative path against the main configuration + file. + type: string + wasmStackSize: + description: Size of the stack size of Wasm execution. Review + unit sizes for allowed values. + pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ + type: string + type: object type: object type: array logLevel: diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml index f678b9bc..3342392b 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml @@ -529,6 +529,41 @@ spec: description: Enable AWS Sigv4 Authentication for Amazon ElasticSearch Service. type: string + awsAuthSecret: + description: AWSAuthSecret Enable AWS Sigv4 Authentication for + Amazon ElasticSearch Service. + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + TODO: Add other useful fields. apiVersion, kind, uid? + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object awsExternalID: description: External ID for the AWS IAM Role specified with aws_role_arn. type: string @@ -556,6 +591,42 @@ spec: description: Specify the credentials to use to connect to Elastic's Elasticsearch Service running on Elastic Cloud. type: string + cloudAuthSecret: + description: CloudAuthSecret Specify the credentials to use to + connect to Elastic's Elasticsearch Service running on Elastic + Cloud. + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + TODO: Add other useful fields. apiVersion, kind, uid? + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object cloudID: description: If you are using Elastic's Elasticsearch Service you can specify the cloud_id of the cluster running. @@ -2856,6 +2927,9 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsBodyKeyAttributes: + description: If true, remaining unmatched keys are added as attributes. + type: boolean logsUri: description: 'Specify an optional HTTP URI for the target web server listening for logs, e.g: /v1/logs' @@ -4156,6 +4230,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. diff --git a/charts/fluent-operator/charts/fluentd-crds/Chart.yaml b/charts/fluent-operator/charts/fluentd-crds/Chart.yaml index c76fc3db..888f0373 100644 --- a/charts/fluent-operator/charts/fluentd-crds/Chart.yaml +++ b/charts/fluent-operator/charts/fluentd-crds/Chart.yaml @@ -5,8 +5,8 @@ keywords: - logging - fluentd - operator -version: 3.1.0 -appVersion: "3.1.0" +version: 3.2.0 +appVersion: "3.2.0" sources: - https://github.com/fluent/fluent-operator maintainers: diff --git a/charts/fluent-operator/templates/fluent-operator-clusterRole.yaml b/charts/fluent-operator/templates/fluent-operator-clusterRole.yaml index c3e2f052..8b610e98 100644 --- a/charts/fluent-operator/templates/fluent-operator-clusterRole.yaml +++ b/charts/fluent-operator/templates/fluent-operator-clusterRole.yaml @@ -1,3 +1,4 @@ +{{- if .Values.operator.enable }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -144,4 +145,5 @@ rules: - list - get - watch - - patch \ No newline at end of file + - patch +{{- end }} \ No newline at end of file diff --git a/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml b/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml index c705dd5b..e346ade2 100644 --- a/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml +++ b/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml @@ -1,3 +1,4 @@ +{{- if .Values.operator.enable }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -12,4 +13,5 @@ roleRef: subjects: - kind: ServiceAccount name: fluent-operator - namespace: {{ .Release.Namespace }} \ No newline at end of file + namespace: {{ .Release.Namespace }} +{{- end }} \ No newline at end of file diff --git a/charts/fluent-operator/templates/fluent-operator-deployment.yaml b/charts/fluent-operator/templates/fluent-operator-deployment.yaml index 557721e8..ab6a27a8 100644 --- a/charts/fluent-operator/templates/fluent-operator-deployment.yaml +++ b/charts/fluent-operator/templates/fluent-operator-deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.operator.enable }} apiVersion: apps/v1 kind: Deployment metadata: @@ -129,3 +130,4 @@ spec: securityContext: {{ toYaml .Values.operator.podSecurityContext | nindent 8 }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml index 90278a64..3523e470 100644 --- a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml +++ b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml @@ -31,6 +31,14 @@ spec: namespaceFluentBitCfgSelector: {{ toYaml .Values.fluentbit.namespaceFluentBitCfgSelector | indent 4 }} {{- end }} +{{- with .Values.fluentbit.command }} + command: +{{ toYaml . | indent 4 }} +{{- end }} +{{- with .Values.fluentbit.args }} + args: +{{ toYaml . | indent 4 }} +{{- end }} {{- if .Values.fluentbit.envVars }} envVars: {{ toYaml .Values.fluentbit.envVars | indent 4 }} @@ -103,5 +111,9 @@ spec: {{- if .Values.fluentbit.disableLogVolumes }} disableLogVolumes: {{ .Values.fluentbit.disableLogVolumes }} {{- end }} +{{- if .Values.fluentbit.initContainers }} + initContainers: + {{ toYaml .Values.fluentbit.initContainers | indent 4 }} +{{- end }} {{- end }} {{- end }} diff --git a/charts/fluent-operator/templates/fluentbit-lua-config.yaml b/charts/fluent-operator/templates/fluentbit-lua-config.yaml index 0dbba4dd..958e22d5 100644 --- a/charts/fluent-operator/templates/fluentbit-lua-config.yaml +++ b/charts/fluent-operator/templates/fluentbit-lua-config.yaml @@ -1,4 +1,5 @@ {{- if .Values.Kubernetes -}} +{{- if .Values.fluentbit.enable -}} apiVersion: v1 kind: ConfigMap metadata: @@ -27,3 +28,4 @@ data: return 1, timestamp, new_record end {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/fluent-operator/templates/serviceaccount.yaml b/charts/fluent-operator/templates/serviceaccount.yaml index 724df5a8..f7b76afa 100644 --- a/charts/fluent-operator/templates/serviceaccount.yaml +++ b/charts/fluent-operator/templates/serviceaccount.yaml @@ -1,7 +1,9 @@ +{{- if .Values.operator.enable }} apiVersion: v1 kind: ServiceAccount metadata: name: fluent-operator labels: app.kubernetes.io/component: operator - app.kubernetes.io/name: fluent-operator \ No newline at end of file + app.kubernetes.io/name: fluent-operator +{{- end }} \ No newline at end of file diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 9bb0c2ea..c9ce36c4 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -24,7 +24,10 @@ operator: memory: 64Mi container: repository: "kubesphere/fluent-operator" - tag: "v3.1.0" + tag: "v3.2.0" + # If set to false, this will disable the creation of ClusterRole, ClusterRoleBinding, + # Deployment, and ServiceAccount resources to avoid conflicts when deploying multiple instances. + enable: true # nodeSelector configuration for Fluent Operator. Ref: https://kubernetes.io/docs/user-guide/node-selection/ nodeSelector: {} # Node tolerations applied to Fluent Operator. Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ @@ -66,7 +69,7 @@ operator: disableComponentControllers: "" # Extra arguments given to the controller flags extraArgs: [] - # - --watch-namespaces=logging + # - --watch-namespaces=logging fluentbit: # Installs a sub chart carrying the CRDs for the fluent-bit controller. The sub chart is enabled by default. @@ -83,7 +86,7 @@ fluentbit: metricRelabelings: [] image: repository: "ghcr.io/fluent/fluent-operator/fluent-bit" - tag: "3.1.5" + tag: "3.1.7" # fluentbit resources. If you do want to specify resources, adjust them as necessary # You can adjust it based on the log volume. resources: @@ -99,7 +102,7 @@ fluentbit: ## Request to Fluent Bit to exclude or not the logs generated by the Pod. # fluentbit.io/exclude: "true" ## Prometheus can use this tag to automatically discover the Pod and collect monitoring data - # prometheus.io/scrape: "true" + # prometheus.io/scrape: "true" # Specify additional custom labels for fluentbit-pods labels: {} @@ -134,6 +137,8 @@ fluentbit: - matchExpressions: - key: node-role.kubernetes.io/edge operator: DoesNotExist + # initContainers configuration for Fluent Bit pods. Ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + initContainers: [] # nodeSelector configuration for Fluent Bit pods. Ref: https://kubernetes.io/docs/user-guide/node-selection/ nodeSelector: {} # Node tolerations applied to Fluent Bit pods. Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ @@ -141,6 +146,10 @@ fluentbit: - operator: Exists # Priority Class applied to Fluent Bit pods. Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass priorityClassName: "" + # custom command. + command: [] + # custom command line arguments. + args: [] # Environment variables that can be passed to fluentbit pods envVars: [] # - name: FOO @@ -209,18 +218,18 @@ fluentbit: pauseOnChunksOverlimit: "off" nodeExporterMetrics: {} # uncomment below nodeExporterMetrics section if you want to collect node exporter metrics - # nodeExporterMetrics: - # tag: node_metrics - # scrapeInterval: 15s - # path: - # procfs: /host/proc - # sysfs: /host/sys + # nodeExporterMetrics: + # tag: node_metrics + # scrapeInterval: 15s + # path: + # procfs: /host/proc + # sysfs: /host/sys fluentBitMetrics: {} # uncomment below fluentBitMetrics section if you want to collect fluentBit metrics - # fluentBitMetrics: - # scrapeInterval: "2" - # scrapeOnStart: true - # tag: "fb.metrics" +# fluentBitMetrics: +# scrapeInterval: "2" +# scrapeOnStart: true +# tag: "fb.metrics" # Configure the output plugin parameter in FluentBit. # You can set enable to true to output logs to the specified location. @@ -265,22 +274,22 @@ fluentbit: enable: false # Uncomment the following section to enable Prometheus metrics exporter. prometheusMetricsExporter: {} - # prometheusMetricsExporter: - # match: "fb.metrics" - # metricsExporter: - # host: "0.0.0.0" - # port: 2020 - # addLabels: - # app: "fluentbit" +# prometheusMetricsExporter: +# match: "fb.metrics" +# metricsExporter: +# host: "0.0.0.0" +# port: 2020 +# addLabels: +# app: "fluentbit" # Loki fluentbit ClusterOutput, to be encapsulated in fluentbit config # See https://github.com/fluent/fluent-operator/blob/master/docs/plugins/fluentbit/output/loki.md # See https://docs.fluentbit.io/manual/pipeline/outputs/loki loki: # Switch for generation of fluentbit loki ClusterOutput (and loki basic auth http user and pass secrets if required) - enable: false - host: 127.0.0.1 - port: 3100 + enable: false # Bool + host: 127.0.0.1 # String + port: 3100 # Int # Either, give http{User,Password},tenantID string values specifying them directly httpUser: myuser httpPassword: mypass @@ -305,9 +314,9 @@ fluentbit: # name: tenantsecret # optional: true # - # To use bearer token auth instead of http basic auth + # To use bearer token auth instead of http basic auth # bearerToken: ey.... - # or with existing secret + # or with existing secret # bearerToken: # valueFrom: # secretKeyRef: @@ -328,15 +337,15 @@ fluentbit: service: storage: {} - # Remove the above storage section and uncomment below section if you want to configure file-system as storage for buffer - # storage: - # path: "/host/fluent-bit-buffer/" - # backlogMemLimit: "50MB" - # checksum: "off" - # deleteIrrecoverableChunks: "on" - # maxChunksUp: 128 - # metrics: "on" - # sync: normal +# Remove the above storage section and uncomment below section if you want to configure file-system as storage for buffer +# storage: +# path: "/host/fluent-bit-buffer/" +# backlogMemLimit: "50MB" +# checksum: "off" +# deleteIrrecoverableChunks: "on" +# maxChunksUp: 128 +# metrics: "on" +# sync: normal # Configure the default filters in FluentBit. # The `filter` will filter and parse the collected log information and output the logs into a uniform format. You can choose whether to turn this on or not. @@ -377,7 +386,7 @@ fluentbit: parsers: javaMultiline: - # use in filter for parser generic springboot multiline log format + # use in filter for parser generic springboot multiline log format enable: false fluentd: