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/10/05 21:16:47 UTC

[GitHub] [airflow] jedcunningham commented on a change in pull request #18542: Allow ingress multiple hostnames w/diff secrets

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



##########
File path: chart/templates/webserver/webserver-ingress.yaml
##########
@@ -99,8 +114,12 @@ spec:
               servicePort: {{ .servicePort }}
               {{- end }}
           {{- end }}
-      {{- if . }}
-      host: {{ . | quote }}
+      {{- $hostname := . -}}
+      {{- if and $.Values.ingress.web.hosts ($.Values.ingress.web.hosts | first | kindIs "string" | not) }}
+      {{- $hostname = .name -}}
+      {{- end }}
+      {{- if $hostname }}
+      host: {{ $hostname | quote }}

Review comment:
       Fair warning, untested, but this seems cleaner to me. (Checking `.` instead of the first element)

##########
File path: chart/values.schema.json
##########
@@ -142,11 +142,47 @@
                             "default": ""
                         },
                         "hosts": {
-                            "description": "The hostnames for the web Ingress.",
+                            "description": "The hostnames or hosts configuration for the web Ingress.",
                             "type": "array",
                             "default": [],
                             "items": {
-                                "type": "string"
+                                "oneOf": [
+                                    {
+                                        "type": "object",
+                                        "additionalProperties": false,
+                                        "properties": {
+                                            "name": {
+                                                "description": "The hostname for the web Ingress.",
+                                                "type": "string",
+                                                "default": ""
+                                            },
+                                            "tls": {
+                                                "description": "Configuration for web Ingress TLS.",
+                                                "type": "object",
+                                                "additionalProperties": false,
+                                                "properties": {
+                                                    "enabled": {
+                                                        "description": "Enable TLS termination for the web Ingress.",
+                                                        "type": "boolean",
+                                                        "default": false
+                                                    },
+                                                    "secretName": {
+                                                        "description": "The name of a pre-created Secret containing a TLS private key and certificate.",
+                                                        "type": "string",
+                                                        "default": ""
+                                                    }
+                                                }
+                                            }
+                                        },
+                                        "required": [
+                                            "name"
+                                        ]
+                                    },
+                                    {
+                                        "type": "string",

Review comment:
       ```suggestion
                                           "type": "string",
                                           "$comment": "Deprecated for objects above",
   ```
   
   Maybe leave ourselves a hint?




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