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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]