From 0d6fb4967c6acf20593849870c534a49ca047124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 21 Jul 2022 17:42:51 +0200 Subject: [PATCH] feat: refactor event collection configuration --- CHANGELOG.md | 2 + deploy/docs/collecting-kubernetes-events.md | 62 +++++++++++++++---- deploy/docs/opentelemetry_collector.md | 12 +--- deploy/helm/sumologic/README.md | 18 +++--- .../sumologic/conf/events/fluentd/events.conf | 8 +-- .../sumologic/conf/events/otelcol/config.yaml | 12 ++-- deploy/helm/sumologic/templates/_helpers.tpl | 3 - .../templates/events/fluentd/statefulset.yaml | 18 +++--- .../templates/events/otelcol/statefulset.yaml | 18 +++--- deploy/helm/sumologic/values.yaml | 39 ++++++------ .../events/static/apiServerUrl.output.yaml | 2 +- .../static/apiServerUrl_null.output.yaml | 2 +- .../static/customSourceCategory.input.yaml | 3 +- .../static/customSourceCategory.output.yaml | 2 +- tests/helm/events/static/default.output.yaml | 2 +- .../watchResourceEventsOverrides.output.yaml | 2 +- ...ceEventsOverrides_apiServerUrl.output.yaml | 2 +- .../helm/events_otc/static/basic.output.yaml | 2 +- .../helm/events_otc/static/options.input.yaml | 11 ++-- .../events_otc/static/override.output.yaml | 2 +- .../static/annotations_labels.output.yaml | 2 +- .../static/basic.output.yaml | 2 +- .../values/values_helm_otelcol_logs.yaml | 7 +-- 23 files changed, 129 insertions(+), 104 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 916474a79a..008d168b5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - chore(kube-prometheus-stack): update kube-prometheus-stack chart to 39.11.0 [#2446] - feat(metrics)!: disable Thanos by default [#2514] - fix(fluentd): Removing PodSecurityPolicy for fluentd [#2605] +- feat!: refactor event collection configuration [#2444] ### Changed @@ -65,6 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#2600]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2600 [#2605]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2605 [#2611]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2611 +[#2444]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2444 [Unreleased]: https://github.com/SumoLogic/sumologic-kubernetes-collection/compare/v2.17.0...main [telegraf_operator_comapare_1.3.5_and_1.3.10]: https://github.com/influxdata/helm-charts/compare/telegraf-operator-1.3.5...telegraf-operator-1.3.10 [cert-manager-1.4]: https://github.com/cert-manager/cert-manager/releases/tag/v1.4.0 diff --git a/deploy/docs/collecting-kubernetes-events.md b/deploy/docs/collecting-kubernetes-events.md index dcc640978a..6c510be1ec 100644 --- a/deploy/docs/collecting-kubernetes-events.md +++ b/deploy/docs/collecting-kubernetes-events.md @@ -5,16 +5,7 @@ You can collect Kubernetes events from the Kubernetes API server and send them t This feature is enabled by default. To disable it, set the `sumologic.events.enabled` property to `false`. -Event collection is performed by the provider specified in `sumologic.events.provider`. This can be either `fluentd` for Fluentd (which is currently the default) or `otelcol` for OpenTelemetry Collector (which will be the default in a future release). -You can switch the provider by setting the property: - -```yaml -sumologic: - events: - provider: otelcol -``` - -Both providers work in the same way: they request all Kubernetes events from the Kubernetes API server. +The event collector collects events by requesting all Kubernetes events from the Kubernetes API server. Note that the resource API used is [core v1][event_v1_core] and not [events.k8s.io/v1][event_events_k8s_io]. The events are sent as logs in their original JSON format to Sumo Logic. @@ -63,7 +54,54 @@ Example Kubernetes event: ## Configuration -To configure event collection, see the following sections of the [values.yaml][values_yaml] file, depending on the provider used: +Event collection configuration can be found under the `sumologic.events` key of the [values.yaml][values_yaml] file. + +### Setting source name and category + +It's possible to customize the [source name][source_name] and [category][source_category] for events: + +```yaml +sumologic: + events: + sourceName: myEventSource + sourceCategory: myCustomSourceCategory +``` + +### Customizing persistence + +By default, the event collector provisions and uses a Kubernetes PersistentVolume to persist some information over service restarts. +In particular, the collector remembers the most recently processed Event this way, thus avoiding having to reprocess past Events +after restart. The Persistent Volume is also used to buffer Event data if the remote destination is inaccessible. + +Persistence can be customized via the `sumologic.events.persistence` section: + +```yaml +sumologic: + events: + persistence: + size: 10Gi + path: /var/lib/storage/events + accessMode: ReadWrite +``` + +#### Disabling persistence + +Persistence can be disabled by setting `sumologic.events.persistence.enabled` to `false`. Keep in mind that doing so will cause +either duplication or data loss whenever the collector is restarted. By default, the collector reads Events 1 minute into the past +from its start time. + +### Configuring the event provider + +Event collection is performed by the provider specified in `sumologic.events.provider`. This can be either `fluentd` for Fluentd (which is currently the default) or `otelcol` for OpenTelemetry Collector (which will be the default in a future release). +You can switch the provider by setting the property: + +```yaml +sumologic: + events: + provider: otelcol +``` + +To change provider-specific configuration, see the following sections of the [values.yaml][values_yaml] file, depending on the provider used: - `fluentd.events` for Fluentd provider (the default) - `otelevents` for OpenTelemetry Collector provider @@ -84,3 +122,5 @@ sumologic: [event_events_k8s_io]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#event-v1-events-k8s-io [values_yaml]: ../helm/sumologic/values.yaml [otelcol_config]: ./opentelemetry_collector.md#kubernetes-events +[source_category]: https://help.sumologic.com/03Send-Data/Sources/04Reference-Information-for-Sources/Metadata-Naming-Conventions#Source_Categories +[source_name]: https://help.sumologic.com/03Send-Data/Sources/04Reference-Information-for-Sources/Metadata-Naming-Conventions#Source_Name diff --git a/deploy/docs/opentelemetry_collector.md b/deploy/docs/opentelemetry_collector.md index c2ea349536..45249d1c0d 100644 --- a/deploy/docs/opentelemetry_collector.md +++ b/deploy/docs/opentelemetry_collector.md @@ -160,7 +160,7 @@ sumologic: otelcol: enabled: true allowSideBySide: true - + fluent-bit: enabled: true ``` @@ -570,16 +570,8 @@ sumologic: provider: otelcol ``` -Currently the OT configuration directly uses the following Fluentd configuration values: - -- `fluentd.events.sourceCategory` to specify the [source category][source_category] for the event logs -- `fluentd.events.sourceName` to specify the [source name][source_name] for the event logs - For configurations that don't modify `sumologic.fluentd.events.overrideOutputConf`, this should be enough. See the configuration -options under `otelevents` in [values.yaml](../helm/sumologic/values.yaml). - -[source_category]: https://help.sumologic.com/docs/send-data/reference-information/metadata-naming-conventions#source-categories -[source_name]: https://help.sumologic.com/docs/send-data/reference-information/metadata-naming-conventions#source-name +options under `otelevents` in [values.yaml](../helm/sumologic/values.yaml) for OT-specific configuration.. ### Customizing OpenTelemetry Collector configuration diff --git a/deploy/helm/sumologic/README.md b/deploy/helm/sumologic/README.md index 597437a36b..af02dde87a 100644 --- a/deploy/helm/sumologic/README.md +++ b/deploy/helm/sumologic/README.md @@ -23,6 +23,14 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `sumologic.cleanupEnabled` | If enabled, a pre-delete hook will destroy Kubernetes secret and Sumo Logic Collector. | `false` | | `sumologic.events.enabled` | Defines whether collection of Kubernetes events is enabled. | `true` | | `sumologic.events.provider` | Defines which provider is used for Kubernetes events collection. This can be either `fluentd` or `otelcol`. | `fluentd` | +| `sumologic.events.sourceName` | Source name for the Events source. | `events` | +| `sumologic.events.sourceCategory` | Source category for the Events source. | `{clusterName}/events` | +| `sumologic.events.persistence.enabled` | Enable persistence for the event collector. Persistence lets the collector avoid reingesting events on restart and buffer them locally if unable to reach the backend. | `true` | +| `sumologic.events.persistence.persistentVolume.path` | Local filesystem path the persistent storage volume will be mounted at. | `/var/lib/storage/events` | +| `sumologic.events.persistence.size` | Size of the persistent storage volume | `10Gi` | +| `sumologic.events.persistence.persistentVolume.storageClass` | The storageClassName for the persistent storage volume | `Nil` | +| `sumologic.events.persistence.persistentVolume.accessMode` | The accessMode for the persistent storage volume | `ReadWriteOnce` | +| `sumologic.events.persistence.persistentVolume.pvcLabels` | Additional PersistentVolumeClaim labels for persistent storage volumes | `[]` | | `sumologic.logs.enabled` | Set the enabled flag to false for disabling logs ingestion altogether. | `true` | | `sumologic.metrics.enabled` | Set the enabled flag to false for disabling metrics ingestion altogether. | `true` | | `sumologic.logs.fields` | Fields to be created at Sumo Logic to ensure logs are tagged with relevant metadata. [Sumo Logic help](https://help.sumologic.com/docs/manage/fields/#manage-fields) | `{}` | @@ -217,7 +225,6 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `fluentd.metrics.extraOutputPluginConf` | To use additional output plugins. | `Nil` | | `fluentd.metrics.overrideOutputConf` | Override output section for metrics. Leave empty for the default output section. | `Nil` | | `fluentd.monitoring` | Configuration of fluentd monitoring metrics. Adds the `fluentd_input_status_num_records_total` metric for input and the `fluentd_output_status_num_records_total` metric for output. | `{"input": false, "output": false}` | -| `fluentd.events.enabled` | If enabled, collect K8s events. | `true` | | `fluentd.events.statefulset.nodeSelector` | Node selector for Fluentd events statefulset. [See docs/Best_Practices.md for more information.](../../docs/Best_Practices.md) | `{}` | | `fluentd.events.statefulset.affinity` | Affinity for Fluentd events statefulset. | `{}` | | `fluentd.events.statefulset.tolerations` | Tolerations for Fluentd events statefulset. | `[]` | @@ -226,8 +233,6 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `fluentd.events.statefulset.podAnnotations` | Additional annotations for fluentd events pods. | `{}` | | `fluentd.events.statefulset.priorityClassName` | Priority class name for fluentd events pods. | `Nil` | | `fluentd.events.statefulset.initContainers` | Define init containers that will be run for fluentd events statefulset. | `[]` | -| `fluentd.events.sourceName` | Source name for the Events source. Default: "events" | `Nil` | -| `fluentd.events.sourceCategory` | Source category for the Events source. Default: "{clusterName}/events" | `Nil` | | `fluentd.events.overrideOutputConf` | Override output section for events. Leave empty for the default output section. | `Nil` | | `metrics-server.enabled` | Set the enabled flag to true for enabling metrics-server. This is required before enabling fluentd autoscaling unless you have an existing metrics-server in the cluster. | `false` | | `metrics-server.fullnameOverride` | Used to override the chart's full name. | `Nil` | @@ -389,12 +394,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `otelevents.image.repository` | Image repository for otelcol docker container. | `public.ecr.aws/sumologic/sumologic-otel-collector` | | `otelevents.image.tag` | Image tag for otelcol docker container. | `0.54.0-sumo-0` | | `otelevents.image.pullPolicy` | Image pullPolicy for otelcol docker container. | `IfNotPresent` | -| `otelevents.logLevel` | Log level for the OpenTelemtry Collector. Can be `debug`, `info`, `warn`, `error`, `dpanic`, `panic`, `fatal`. | `info` | -| `otelevents.persistence.enabled` | Enable persistence for OpenTelemetry Collector. | `true` | -| `otelevents.persistence.storageClass` | Defines storageClassName for the PersistentVolumeClaim which is used to provide persistence for OpenTelemetry Collector. | `Nil` | -| `otelevents.persistence.accessMode` | The accessMode for the volume which is used to provide persistence for OpenTelemetry Collector. | `ReadWriteOnce` | -| `otelevents.persistence.size` | Size of the volume which is used to provide persistence for OpenTelemetry Collector. | `10Gi` | -| `otelevents.persistence.pvcLabels` | Additional PersistentVolumeClaim labels for all OpenTelemetry Collector pods. | `{}` | +| `otelevents.logLevel` | Log level for the OpenTelemtry Collector. Can be `debug`, `info`, `warn`, `error`, `dpanic`, `panic`, `fatal`. | `info` | | `{}` | | `otelevents.config.override` | Override configuration for OpenTelemetry Collector. See [the documentation](../../docs/opentelemetry_collector.md#customizing-opentelemetry-collector-configuration) for more details. | `{}` | | `otelevents.statefulset` | OpenTelemetry Collector StatefulSet customization options. See values.yaml for more details. | See [values.yaml] | | `tailing-sidecar-operator.enabled` | Flag to control deploying Tailing Sidecar Operator Helm sub-chart. | `false` | diff --git a/deploy/helm/sumologic/conf/events/fluentd/events.conf b/deploy/helm/sumologic/conf/events/fluentd/events.conf index ef78438a42..f7906bbc5d 100644 --- a/deploy/helm/sumologic/conf/events/fluentd/events.conf +++ b/deploy/helm/sumologic/conf/events/fluentd/events.conf @@ -57,8 +57,8 @@ @id sumologic.endpoint.events sumo_client {{ include "sumologic.sumo_client" . | quote }} endpoint "#{ENV['SUMO_ENDPOINT_DEFAULT_EVENTS_SOURCE']}" - source_name {{ .Values.fluentd.events.sourceName }} - source_category {{ .Values.fluentd.events.sourceCategory | default (printf "%s/%s" (include "sumologic.clusterNameReplaceSpaceWithDash" .) (.Values.fluentd.events.sourceName ))}} + source_name {{ .Values.sumologic.events.sourceName }} + source_category {{ .Values.sumologic.events.sourceCategory | default (printf "%s/%s" (include "sumologic.clusterNameReplaceSpaceWithDash" .) (.Values.sumologic.events.sourceName ))}} data_type logs disable_cookies true verify_ssl {{ .Values.fluentd.verifySsl | quote }} @@ -66,9 +66,9 @@ compress {{ .Values.fluentd.compression.enabled | quote }} compress_encoding {{ .Values.fluentd.compression.encoding | quote }} - {{- if or .Values.fluentd.persistence.enabled (eq .Values.fluentd.buffer.type "file") }} + {{- if .Values.sumologic.events.persistence.enabled }} @type file - path {{ .Values.fluentd.buffer.filePaths.events }} + path {{ .Values.sumologic.events.persistence.persistentVolume.path }} {{- else }} @type memory {{- end }} diff --git a/deploy/helm/sumologic/conf/events/otelcol/config.yaml b/deploy/helm/sumologic/conf/events/otelcol/config.yaml index 7ac6c01896..c687429421 100644 --- a/deploy/helm/sumologic/conf/events/otelcol/config.yaml +++ b/deploy/helm/sumologic/conf/events/otelcol/config.yaml @@ -2,9 +2,9 @@ receivers: raw_k8s_events: {} extensions: health_check: {} -{{- if .Values.otelevents.persistence.enabled }} +{{- if .Values.sumologic.events.persistence.enabled }} file_storage: - directory: /var/lib/storage/otc + directory: {{ .Values.sumologic.events.persistence.persistentVolume.path }} timeout: 10s {{- end }} pprof: {} @@ -19,7 +19,7 @@ exporters: source_category: "%{_sourceCategory}" sending_queue: enabled: true - persistent_storage_enabled: {{ .Values.otelevents.persistence.enabled }} + persistent_storage_enabled: {{ .Values.sumologic.events.persistence.enabled }} processors: memory_limiter: check_interval: 1s @@ -36,8 +36,8 @@ processors: action: upsert source: collector: {{ .Values.sumologic.collectorName | default .Values.sumologic.clusterName | quote }} - source_name: {{ .Values.fluentd.events.sourceName | quote}} - source_category: {{ .Values.fluentd.events.sourceCategory | default (printf "%s/%s" (include "sumologic.clusterNameReplaceSpaceWithDash" .) (.Values.fluentd.events.sourceName )) | quote}} + source_name: {{ .Values.sumologic.events.sourceName | quote}} + source_category: {{ .Values.sumologic.events.sourceCategory | default (printf "%s/%s" (include "sumologic.clusterNameReplaceSpaceWithDash" .) (.Values.fluentd.events.sourceName )) | quote}} source_category_prefix: "" sumologic_schema: add_cloud_namespace: false @@ -48,7 +48,7 @@ service: level: {{ .Values.otelevents.logLevel }} extensions: - health_check -{{- if .Values.otelevents.persistence.enabled }} +{{- if .Values.sumologic.events.persistence.enabled }} - file_storage {{- end }} - pprof diff --git a/deploy/helm/sumologic/templates/_helpers.tpl b/deploy/helm/sumologic/templates/_helpers.tpl index 4b4086169a..a087984483 100644 --- a/deploy/helm/sumologic/templates/_helpers.tpl +++ b/deploy/helm/sumologic/templates/_helpers.tpl @@ -1464,9 +1464,6 @@ Example Usage: {{- $enabled = false -}} {{- end -}} {{- end -}} -{{- if eq .Values.fluentd.events.enabled false -}} -{{- $enabled = false -}} -{{- end -}} {{ $enabled }} {{- end -}} diff --git a/deploy/helm/sumologic/templates/events/fluentd/statefulset.yaml b/deploy/helm/sumologic/templates/events/fluentd/statefulset.yaml index afc1766376..a77e84c2cb 100644 --- a/deploy/helm/sumologic/templates/events/fluentd/statefulset.yaml +++ b/deploy/helm/sumologic/templates/events/fluentd/statefulset.yaml @@ -84,10 +84,10 @@ spec: volumeMounts: - name: config-volume mountPath: /fluentd/etc/ -{{- if .Values.fluentd.persistence.enabled }} +{{- if .Values.sumologic.events.persistence.enabled }} - name: buffer - mountPath: "/fluentd/buffer" -{{- end}} + mountPath: {{ .Values.sumologic.events.persistence.persistentVolume.path | quote }} +{{- end }} {{- if .Values.fluentd.events.extraVolumeMounts }} {{ toYaml .Values.fluentd.events.extraVolumeMounts | indent 8 }} {{- end }} @@ -110,19 +110,19 @@ spec: {{- if .Values.fluentd.events.extraEnvVars }} {{ toYaml .Values.fluentd.events.extraEnvVars | nindent 8 }} {{- end }} -{{- if .Values.fluentd.persistence.enabled }} +{{- if .Values.sumologic.events.persistence.enabled }} volumeClaimTemplates: - metadata: name: buffer -{{- if .Values.fluentd.pvcLabels }} +{{- if .Values.sumologic.events.persistence.persistentVolume.pvcLabels }} labels: -{{ toYaml .Values.fluentd.pvcLabels | indent 8 }} +{{ toYaml .Values.sumologic.events.persistence.persistentVolume.pvcLabels | indent 8 }} {{- end }} spec: - accessModes: [{{ .Values.fluentd.persistence.accessMode }}] - storageClassName: {{ .Values.fluentd.persistence.storageClass }} + accessModes: [{{ .Values.sumologic.events.persistence.persistentVolume.accessMode }}] + storageClassName: {{ .Values.sumologic.events.persistence.persistentVolume.storageClass }} resources: requests: - storage: {{ .Values.fluentd.persistence.size }} + storage: {{ .Values.sumologic.events.persistence.size }} {{- end }} {{- end }} diff --git a/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml b/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml index 1f49f51ea0..eda827759d 100644 --- a/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml +++ b/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml @@ -135,10 +135,10 @@ spec: - name: config-volume mountPath: /etc/otel/config.yaml subPath: config.yaml -{{- if .Values.otelevents.persistence.enabled }} +{{- if .Values.sumologic.events.persistence.enabled }} - name: file-storage - mountPath: /var/lib/storage/otc -{{- end}} + mountPath: {{ .Values.sumologic.events.persistence.persistentVolume.path }} +{{- end }} {{- if .Values.otelevents.statefulset.extraVolumeMounts }} {{ toYaml .Values.otelevents.statefulset.extraVolumeMounts | indent 8 }} {{- end }} @@ -148,19 +148,19 @@ spec: {{- if .Values.otelevents.statefulset.extraEnvVars }} {{ toYaml .Values.otelevents.statefulset.extraEnvVars | nindent 8 }} {{- end }} -{{- if .Values.otelevents.persistence.enabled }} +{{- if .Values.sumologic.events.persistence.enabled }} volumeClaimTemplates: - metadata: name: file-storage -{{- if .Values.otelevents.persistence.pvcLabels }} +{{- if .Values.sumologic.events.persistence.persistentVolume.pvcLabels }} labels: -{{ toYaml .Values.otelevents.persistence.pvcLabels | indent 8 }} +{{ toYaml .Values.sumologic.events.persistence.persistentVolume.pvcLabels | indent 8 }} {{- end }} spec: - accessModes: [{{ .Values.otelevents.persistence.accessMode }}] - storageClassName: {{ .Values.otelevents.persistence.storageClass }} + accessModes: [{{ .Values.sumologic.events.persistence.persistentVolume.accessMode }}] + storageClassName: {{ .Values.sumologic.events.persistence.persistentVolume.storageClass }} resources: requests: - storage: {{ .Values.otelevents.persistence.size }} + storage: {{ .Values.sumologic.events.persistence.size }} {{- end }} {{- end }} diff --git a/deploy/helm/sumologic/values.yaml b/deploy/helm/sumologic/values.yaml index a4a78b8285..d552d7aada 100644 --- a/deploy/helm/sumologic/values.yaml +++ b/deploy/helm/sumologic/values.yaml @@ -210,6 +210,25 @@ sumologic: events: provider: fluentd + ## Source name for the Events source. Default: "events" + sourceName: "events" + + ## Source category for the Events source. Default: "" which is resolved to "{clusterName}/events" + # sourceCategory: "kubernetes/events" + + persistence: + enabled: true + size: 10Gi + + ## Configuration for the Persistent Volume and Persistent Volume Claim + ## where the storage is kept + persistentVolume: + path: /var/lib/storage/events + accessMode: ReadWriteOnce + ## Add custom labels to otelcol event statefulset PVC + pvcLabels: {} + # storageClass: + ### Logs configuration ## Set the enabled flag to false for disabling logs ingestion altogether. logs: @@ -414,7 +433,6 @@ fluentd: node: /fluentd/buffer/metrics.node control-plane: /fluentd/buffer/metrics.control_plane default: /fluentd/buffer/metrics.default - events: /fluentd/buffer/events traces: /fluentd/buffer/traces ## Additional config for buffer settings @@ -921,10 +939,6 @@ fluentd: weight: 100 events: - ## If enabled, collect K8s events - ## Deprecated, use `sumologic.events.enabled` instead - enabled: true - statefulset: nodeSelector: {} tolerations: [] @@ -971,12 +985,6 @@ fluentd: sourceName: "events" ## Source category for the Events source. Default: "{clusterName}/events" # sourceCategory: "kubernetes/events" - ## Override Kubernetes resource types you want to get events for from different Kubernetes - ## API versions. The key represents the name of the resource type and the value represents - ## the API version. - # watchResourceEventsOverrides: - # pods: "v1" - # events: "events.k8s.io/v1beta1" ## Extra Environment Values - allows yaml definitions # extraEnvVars: @@ -4817,15 +4825,6 @@ otelgateway: ## It is used when the `sumologic.events.provider` is set to `otelcol`. ## See https://github.com/SumoLogic/sumologic-kubernetes-collection/deploy/docs/collecting-kubernetes-events.md. otelevents: - - ## Configure persistence for Opentelemetry Collector - persistence: - enabled: true - accessMode: ReadWriteOnce - size: 10Gi - ## Add custom labels to otelcol event statefulset PVC - pvcLabels: {} - ## Configure image for Opentelemetry Collector image: repository: public.ecr.aws/sumologic/sumologic-otel-collector diff --git a/tests/helm/events/static/apiServerUrl.output.yaml b/tests/helm/events/static/apiServerUrl.output.yaml index cf4a859cbb..aaf298f16c 100644 --- a/tests/helm/events/static/apiServerUrl.output.yaml +++ b/tests/helm/events/static/apiServerUrl.output.yaml @@ -60,7 +60,7 @@ data: compress_encoding "gzip" @type file - path /fluentd/buffer/events + path /var/lib/storage/events @include buffer.output.conf diff --git a/tests/helm/events/static/apiServerUrl_null.output.yaml b/tests/helm/events/static/apiServerUrl_null.output.yaml index 97a6a11431..68adabc955 100644 --- a/tests/helm/events/static/apiServerUrl_null.output.yaml +++ b/tests/helm/events/static/apiServerUrl_null.output.yaml @@ -59,7 +59,7 @@ data: compress_encoding "gzip" @type file - path /fluentd/buffer/events + path /var/lib/storage/events @include buffer.output.conf diff --git a/tests/helm/events/static/customSourceCategory.input.yaml b/tests/helm/events/static/customSourceCategory.input.yaml index 630d2db2f5..c1739f48c2 100644 --- a/tests/helm/events/static/customSourceCategory.input.yaml +++ b/tests/helm/events/static/customSourceCategory.input.yaml @@ -1,5 +1,4 @@ -fluentd: +sumologic: events: - enabled: true sourceCategory: custom/sou-rce_categ sourceName: cus-tom/Sour_ce:NAME diff --git a/tests/helm/events/static/customSourceCategory.output.yaml b/tests/helm/events/static/customSourceCategory.output.yaml index 62896ba976..3cf600d8c8 100644 --- a/tests/helm/events/static/customSourceCategory.output.yaml +++ b/tests/helm/events/static/customSourceCategory.output.yaml @@ -59,7 +59,7 @@ data: compress_encoding "gzip" @type file - path /fluentd/buffer/events + path /var/lib/storage/events @include buffer.output.conf diff --git a/tests/helm/events/static/default.output.yaml b/tests/helm/events/static/default.output.yaml index 97a6a11431..68adabc955 100644 --- a/tests/helm/events/static/default.output.yaml +++ b/tests/helm/events/static/default.output.yaml @@ -59,7 +59,7 @@ data: compress_encoding "gzip" @type file - path /fluentd/buffer/events + path /var/lib/storage/events @include buffer.output.conf diff --git a/tests/helm/events/static/watchResourceEventsOverrides.output.yaml b/tests/helm/events/static/watchResourceEventsOverrides.output.yaml index b340a95099..e8d22df49a 100644 --- a/tests/helm/events/static/watchResourceEventsOverrides.output.yaml +++ b/tests/helm/events/static/watchResourceEventsOverrides.output.yaml @@ -67,7 +67,7 @@ data: compress_encoding "gzip" @type file - path /fluentd/buffer/events + path /var/lib/storage/events @include buffer.output.conf diff --git a/tests/helm/events/static/watchResourceEventsOverrides_apiServerUrl.output.yaml b/tests/helm/events/static/watchResourceEventsOverrides_apiServerUrl.output.yaml index 0dbb40e9e2..1015152064 100644 --- a/tests/helm/events/static/watchResourceEventsOverrides_apiServerUrl.output.yaml +++ b/tests/helm/events/static/watchResourceEventsOverrides_apiServerUrl.output.yaml @@ -69,7 +69,7 @@ data: compress_encoding "gzip" @type file - path /fluentd/buffer/events + path /var/lib/storage/events @include buffer.output.conf diff --git a/tests/helm/events_otc/static/basic.output.yaml b/tests/helm/events_otc/static/basic.output.yaml index cfef695950..fd3d1acb30 100644 --- a/tests/helm/events_otc/static/basic.output.yaml +++ b/tests/helm/events_otc/static/basic.output.yaml @@ -25,7 +25,7 @@ data: source_name: '%{_sourceName}' extensions: file_storage: - directory: /var/lib/storage/otc + directory: /var/lib/storage/events timeout: 10s health_check: {} pprof: {} diff --git a/tests/helm/events_otc/static/options.input.yaml b/tests/helm/events_otc/static/options.input.yaml index 298038d140..c166bb64eb 100644 --- a/tests/helm/events_otc/static/options.input.yaml +++ b/tests/helm/events_otc/static/options.input.yaml @@ -1,11 +1,4 @@ -fluentd: - events: - sourceName: testSourceName - sourceCategory: testSourceCategory - otelevents: - persistence: - enabled: false logLevel: debug sumologic: @@ -13,5 +6,9 @@ sumologic: collectorName: testCollector events: provider: otelcol + sourceName: testSourceName + sourceCategory: testSourceCategory + persistence: + enabled: false diff --git a/tests/helm/events_otc/static/override.output.yaml b/tests/helm/events_otc/static/override.output.yaml index 0e52e00975..10844954bf 100644 --- a/tests/helm/events_otc/static/override.output.yaml +++ b/tests/helm/events_otc/static/override.output.yaml @@ -25,7 +25,7 @@ data: source_name: '%{_sourceName}' extensions: file_storage: - directory: /var/lib/storage/otc + directory: /var/lib/storage/events timeout: 10s health_check: {} pprof: {} diff --git a/tests/helm/events_otc_statefulset/static/annotations_labels.output.yaml b/tests/helm/events_otc_statefulset/static/annotations_labels.output.yaml index 87d6fd4fae..c913dc3327 100644 --- a/tests/helm/events_otc_statefulset/static/annotations_labels.output.yaml +++ b/tests/helm/events_otc_statefulset/static/annotations_labels.output.yaml @@ -101,7 +101,7 @@ spec: mountPath: /etc/otel/config.yaml subPath: config.yaml - name: file-storage - mountPath: /var/lib/storage/otc + mountPath: /var/lib/storage/events env: - name: SUMO_ENDPOINT_DEFAULT_EVENTS_SOURCE valueFrom: diff --git a/tests/helm/events_otc_statefulset/static/basic.output.yaml b/tests/helm/events_otc_statefulset/static/basic.output.yaml index b7400317b8..1b8e0aa530 100644 --- a/tests/helm/events_otc_statefulset/static/basic.output.yaml +++ b/tests/helm/events_otc_statefulset/static/basic.output.yaml @@ -110,7 +110,7 @@ spec: mountPath: /etc/otel/config.yaml subPath: config.yaml - name: file-storage - mountPath: /var/lib/storage/otc + mountPath: /var/lib/storage/events - mountPath: /certs name: es-certs readOnly: true diff --git a/tests/integration/values/values_helm_otelcol_logs.yaml b/tests/integration/values/values_helm_otelcol_logs.yaml index 35eb8ac77b..34da67c60f 100644 --- a/tests/integration/values/values_helm_otelcol_logs.yaml +++ b/tests/integration/values/values_helm_otelcol_logs.yaml @@ -9,14 +9,13 @@ sumologic: metrics: enabled: false + events: + enabled: false + # We're using otelcol instead fluent-bit: enabled: false -fluentd: - events: - enabled: false - metadata: logs: config: