xchwan commented on code in PR #75945:
URL: https://github.com/apache/airflow/pull/75945#discussion_r4579179220


##########
chart/templates/dag-processor/dag-processor-serviceaccount.yaml:
##########
@@ -20,23 +20,52 @@
 #######################################
 ## Airflow Dag Processor ServiceAccount
 #######################################
-{{- if and .Values.dagProcessor.enabled 
.Values.dagProcessor.serviceAccount.create }}
+{{- if .Values.dagProcessor.enabled }}
+{{- $globals := deepCopy . -}}
+{{- $dagProcessorSets := .Values.dagProcessor.sets | default list -}}
+{{- $enableDefault := .Values.dagProcessor.enableDefault -}}
+{{- if kindIs "invalid" $enableDefault -}}
+  {{- $enableDefault = not .Values.dagProcessor.sets -}}
+{{- end -}}
+{{- if $enableDefault -}}
+  {{- $dagProcessorSets = concat (list (dict "name" "default")) 
$dagProcessorSets -}}
+{{- end -}}
+{{- $parentName := include "dagProcessor.serviceAccountName" . -}}
+{{- $rendered := dict -}}
+{{- range $dagProcessorSet := $dagProcessorSets -}}
+  {{- $dagProcessor := include "workersMergeValues" (list 
$.Values.dagProcessor $dagProcessorSet) | fromYaml -}}
+  {{- $_ := set $globals.Values "dagProcessor" $dagProcessor -}}
+  {{- with $globals -}}
+    {{- if .Values.dagProcessor.serviceAccount.create -}}

Review Comment:
   Good catch. I will loop over the Dag processor ServiceAccount names the 
chart actually renders in the SCC rolebinding, using the same name resolution 
as the ServiceAccount template, and add a test for it. Agreed to leave the 
worker sets out of this PR.
   
   ---
   Drafted-by: Claude Code (Sonnet 5.5) 



-- 
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