Skip to content

Commit

Permalink
chore: fail if fluent is being used
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
  • Loading branch information
Dominik Rosiek committed Sep 5, 2023
1 parent efd2d87 commit 71d6dd7
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions deploy/helm/sumologic/templates/checks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@
{{- end -}}
{{- end -}}

{{/* Check if metrics provider is set to either fluentd or otelcol */}}
{{- if not (or (eq .Values.sumologic.metrics.metadata.provider "fluentd") (eq .Values.sumologic.metrics.metadata.provider "otelcol")) -}}
{{- fail "\nsumologic.metrics.metadata.provider should be set to either fluentd or otelcol" -}}
{{/* Check if metrics metadata provider is set to unsupported Fluentd */}}
{{- if eq (dig "sumologic" "metrics" "metadata" "provider" "otelcol" .Values.AsMap) "fluentd" -}}
{{- fail "\nFluentd for metrics metadata has been removed. Please follow migration document to use Open Telemetry Collector instead" -}}
{{- end -}}

{{/* Check if logs provider is set to either fluentd or otelcol */}}
{{- if not (or (eq .Values.sumologic.logs.metadata.provider "fluentd") (eq .Values.sumologic.logs.metadata.provider "otelcol")) -}}
{{- fail "\nsumologic.logs.metadata.provider should be set to either fluentd or otelcol" -}}
{{/* Check if logs metadata provider is set to unsupported Fluentd */}}
{{- if eq (dig "sumologic" "logs" "metadata" "provider" "otelcol" .Values.AsMap) "fluentd" -}}
{{- fail "\nFluentd for logs metadata has been removed. Please follow migration document to use Open Telemetry Collector instead" -}}
{{- end -}}

{{/* Check if events metadata provider is set to unsupported Fluentd */}}
{{- if eq (dig "sumologic" "events" "provider" "otelcol" .Values.AsMap) "fluentd" -}}
{{- fail "\nFluentd for events has been removed. Please follow migration document to use Open Telemetry Collector instead" -}}
{{- end -}}

{{/* Check if Fluent Bit is enabled */}}
{{- if eq (dig "fluent-bit" "enabled" false .Values.AsMap) true -}}
{{- fail "\nFluent Bit has been removed. Please follow migration document to use Open Telemetry Collector instead" -}}
{{- end -}}

0 comments on commit 71d6dd7

Please sign in to comment.