dstandish commented on a change in pull request #18542:
URL: https://github.com/apache/airflow/pull/18542#discussion_r754809071



##########
File path: chart/templates/webserver/webserver-ingress.yaml
##########
@@ -39,12 +39,27 @@ metadata:
     {{- toYaml . | nindent 4 }}
   {{- end }}
 spec:
-  {{- if .Values.ingress.web.tls.enabled }}
+  {{- if and .Values.ingress.web.hosts (.Values.ingress.web.hosts | first | 
kindIs "string" | not) }}
+  {{- $anyTlsHosts := false -}}
+  {{- range .Values.ingress.web.hosts }}
+  {{- if .tls.enabled }}

Review comment:
       i think there is something wrong here.  i tried rendering this config 
(the 1.20 list[str] behavior)
   
   ```
   ingress:
     enabled: true
     web:
       # host: "hi.com"
       hosts:
       - name: "yo.com"
       #   # configs for web Ingress TLS
       #   tls:
       #     # Enable TLS termination for the web Ingress
       #     enabled: false
       #     # the name of a pre-created Secret containing a TLS private key 
and certificate
       #     secretName: ""
   ```
   
   and i get this error
   
   ```
   ❯ helm template ~/code/airflow/chart -f ingress-config.yaml -s 
templates/webserver/webserver-ingress.yaml
   Error: template: airflow/templates/webserver/webserver-ingress.yaml:45:13: 
executing "airflow/templates/webserver/webserver-ingress.yaml" at 
<.tls.enabled>: nil pointer evaluating interface {}.enable
   ```
   
   and if i'm actually catching something then there are probably similar 
issues where this logic is repeated
   
   we should probably also verify that  "yo.com" beats "hi.com" if the latter 
were uncommented in that example, not sure if we check that in the tests.




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