You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/05 17:23:10 UTC

[GitHub] [airflow] jedcunningham commented on a change in pull request #17433: KEDA task count query should ignore k8s queue

jedcunningham commented on a change in pull request #17433:
URL: https://github.com/apache/airflow/pull/17433#discussion_r683648189



##########
File path: chart/templates/workers/worker-kedaautoscaler.yaml
##########
@@ -49,5 +49,7 @@ spec:
         query: >-
           SELECT ceil(COUNT(*)::decimal / {{ .Values.config.celery.worker_concurrency }})
           FROM task_instance
-          WHERE state='running' OR state='queued'
+          WHERE (state='running' OR state='queued')
+{{ $k8s_queue := default (printf "kubernetes") .Values.config.celery_kubernetes_executor.kubernetes_queue -}}
+{{ eq .Values.executor "CeleryKubernetesExecutor" | ternary (printf "AND queue != '%s'" $k8s_queue) (print "") | indent 14 }}

Review comment:
       ```suggestion
             WHERE (state='running' OR state='queued')
             {{- if eq .Values.executor "CeleryKubernetesExecutor" }}
             AND queue != '{{ .Values.config.celery_kubernetes_executor.kubernetes_queue }}'
             {{- end }}
   ```
   
   Do we need the default if we've set it in values already? I think this is easier to read.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org