Miretpl commented on code in PR #70213:
URL: https://github.com/apache/airflow/pull/70213#discussion_r3633862324


##########
chart/templates/_helpers.yaml:
##########
@@ -87,7 +87,8 @@ If release name contains chart name it will be used as a full 
name.
   {{- $triggererKedaEnabled := and .Values.triggerer.enabled 
.Values.triggerer.keda.enabled }}
   {{- $workersKedaNeedsDbConn := and .Values.workers.celery.keda.enabled (or 
(eq .Values.data.metadataConnection.protocol "mysql") (and 
.Values.pgbouncer.enabled (not .Values.workers.celery.keda.usePgbouncer))) }}
   {{- $triggererKedaNeedsDbConn := and $triggererKedaEnabled (or (eq 
.Values.data.metadataConnection.protocol "mysql") (and 
.Values.pgbouncer.enabled (not .Values.triggerer.keda.usePgbouncer))) }}
-  {{- if or $workersKedaNeedsDbConn $triggererKedaNeedsDbConn }}
+  {{- $component := .Component | default "" }}
+  {{- if or (and (eq $component "worker") $workersKedaNeedsDbConn) (and (eq 
$component "triggerer") $triggererKedaNeedsDbConn) }}

Review Comment:
   Variables defined under the `standard_airflow_environment` helper function, 
by definition, should be added to every component. Could we extract 
KEDA-related environments to a dedicated helper function which would be used in 
the proper components instead? I think it will make the implementation itself 
cleaner.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to