From 2b7354d3e551779ec508301355c11829cebed26c Mon Sep 17 00:00:00 2001 From: "Christopher P. Anderson" <48180628+topherinternational@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:39:13 -0600 Subject: [PATCH] cfg sets remote_logging for ES or OS --- chart/templates/scheduler/scheduler-deployment.yaml | 8 ++++---- chart/values.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chart/templates/scheduler/scheduler-deployment.yaml b/chart/templates/scheduler/scheduler-deployment.yaml index 551ab94c8c48d..ed63f1ef46903 100644 --- a/chart/templates/scheduler/scheduler-deployment.yaml +++ b/chart/templates/scheduler/scheduler-deployment.yaml @@ -30,8 +30,8 @@ {{- $stateful := and $local $persistence }} # We can skip DAGs mounts on scheduler if dagProcessor is enabled, except with $local mode {{- $localOrDagProcessorDisabled := or (not .Values.dagProcessor.enabled) $local }} -# If we're using elasticsearch logging -{{- $elasticsearch := .Values.elasticsearch.enabled }} +# If we're using elasticsearch or opensearch logging +{{- $remoteLogging := or .Values.elasticsearch.enabled .Values.opensearch.enabled }} {{- $nodeSelector := or .Values.scheduler.nodeSelector .Values.nodeSelector }} {{- $affinity := or .Values.scheduler.affinity .Values.affinity }} {{- $tolerations := or .Values.scheduler.tolerations .Values.tolerations }} @@ -217,8 +217,8 @@ spec: {{- else }} {{- include "scheduler_startup_check_command" . | indent 14 }} {{- end }} - {{- if and $local (not $elasticsearch) }} - # Serve logs if we're in local mode and we don't have elasticsearch enabled. + {{- if and $local (not $remoteLogging) }} + # Serve logs if we're in local mode and we have neither elasticsearch nor opensearch enabled. ports: - name: worker-logs containerPort: {{ .Values.ports.workerLogs }} diff --git a/chart/values.yaml b/chart/values.yaml index 4971a4e72d622..3e0ce8e4b5021 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -2607,9 +2607,9 @@ config: executor: '{{ .Values.executor }}' # For Airflow 1.10, backward compatibility; moved to [logging] in 2.0 colored_console_log: 'False' - remote_logging: '{{- ternary "True" "False" .Values.elasticsearch.enabled }}' + remote_logging: '{{- ternary "True" "False" (or .Values.elasticsearch.enabled .Values.opensearch.enabled) }}' logging: - remote_logging: '{{- ternary "True" "False" .Values.elasticsearch.enabled }}' + remote_logging: '{{- ternary "True" "False" (or .Values.elasticsearch.enabled .Values.opensearch.enabled) }}' colored_console_log: 'False' metrics: statsd_on: '{{ ternary "True" "False" .Values.statsd.enabled }}'