jedcunningham commented on code in PR #34716:
URL: https://github.com/apache/airflow/pull/34716#discussion_r1342914940


##########
chart/templates/webserver/webserver-httproute.yaml:
##########
@@ -0,0 +1,82 @@
+{{/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/}}
+
+################################
+## Airflow Webserver HTTPRoute
+#################################
+{{- if .Values.httpRoute.web.enabled }}
+{{- $fullname := (include "airflow.fullname" .) }}
+kind: HTTPRoute
+apiVersion: gateway.networking.k8s.io/v1beta1
+metadata:
+  name: {{ $fullname }}-httproute
+  labels:
+    tier: airflow
+    component: airflow-httproute
+    release: {{ .Release.Name }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: {{ .Release.Service }}
+    {{- if or (.Values.labels) (.Values.webserver.labels) }}
+      {{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 
4 }}
+    {{- end }}
+  {{- with .Values.httpRoute.web.annotations }}
+  annotations: {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+  parentRefs:
+    - kind: Gateway
+      name: {{ .Values.httpRoute.web.gateway.name }}
+      namespace: {{ .Values.httpRoute.web.gateway.namespace }}
+  {{- with .Values.httpRoute.web.hostnames }}
+  hostnames:
+    {{- . | toYaml | nindent 4 }}
+  {{- end }}
+  rules:
+    - backendRefs:
+        - name: {{ $fullname }}-webserver
+          port: 8080

Review Comment:
   Can this use a named port (`airflow-ui`) instead? If not, it needs to use 
`.Values.ports.airflowUI` instead.



##########
chart/values.yaml:
##########
@@ -220,6 +220,31 @@ ingress:
       # the name of a pre-created Secret containing a TLS private key and 
certificate
       secretName: ""
 
+# Enable the creation of a Kubernetes HTTPRoute and HealthCheckPolicy
+httpRoute:
+  web:
+    # Enable web ingress resource

Review Comment:
   ```suggestion
       # Enable web HTTPRoute resource
   ```
   
   nit



##########
chart/templates/flower/flower-httproute.yaml:
##########
@@ -0,0 +1,82 @@
+{{/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/}}
+
+################################
+## Airflow Flower HTTPRoute
+#################################
+{{- if .Values.httpRoute.flower.enabled }}
+{{- $fullname := (include "airflow.fullname" .) }}
+kind: HTTPRoute
+apiVersion: gateway.networking.k8s.io/v1beta1
+metadata:
+  name: {{ $fullname }}-httproute
+  labels:
+    tier: airflow
+    component: airflow-httproute
+    release: {{ .Release.Name }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: {{ .Release.Service }}
+    {{- if or (.Values.labels) (.Values.flower.labels) }}
+      {{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 
}}
+    {{- end }}
+  {{- with .Values.httpRoute.flower.annotations }}
+  annotations: {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+  parentRefs:
+    - kind: Gateway
+      name: {{ .Values.httpRoute.flower.gateway.name }}
+      namespace: {{ .Values.httpRoute.flower.gateway.namespace }}
+  {{- with .Values.httpRoute.flower.hostnames }}
+  hostnames:
+    {{- . | toYaml | nindent 4 }}
+  {{- end }}
+  rules:
+    - backendRefs:
+        - name: {{ $fullname }}-flower
+          port: 8080

Review Comment:
   Same here, plus flower uses 5555 by default?



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