Miretpl commented on code in PR #68552:
URL: https://github.com/apache/airflow/pull/68552#discussion_r3447413222


##########
chart/values.yaml:
##########
@@ -1649,6 +1605,48 @@ migrateDatabaseJob:
 apiServer:
   enabled: true
 
+  # Kubernetes Gateway API (HTTPRoute) configuration for the API server.
+  # Requires the Gateway API CRDs to be installed in the cluster
+  # (https://gateway-api.sigs.k8s.io/guides/#installing-gateway-api).
+  # The HTTPRoute references an externally managed Gateway via `parentRefs`.
+  httpRoute:

Review Comment:
   Could you add a short note regarding the ingress (exclusive options)?



##########
chart/templates/api-server/api-server-httproute.yaml:
##########
@@ -20,7 +20,13 @@
 ##################################
 ## Airflow API Server HTTPRoute
 ##################################
-{{- if and .Values.apiServer.enabled .Values.httpRoute.apiServer.enabled }}
+{{- if and .Values.apiServer.enabled .Values.apiServer.httpRoute.enabled }}
+{{- if .Values.ingress.apiServer.enabled }}
+{{- fail "`apiServer.httpRoute.enabled` and `ingress.apiServer.enabled` are 
both set to `true`. HTTPRoute (Gateway API) is an alternative to the API server 
Ingress; enable only one of them." }}
+{{- end }}

Review Comment:
   Could you add similar check for the ingress side too?



##########
chart/values.yaml:
##########
@@ -290,50 +290,6 @@ ingress:
     # The Ingress Class for the PgBouncer Ingress

Review Comment:
   Could you add a comment next to the proper ingress section regarding this 
option too?



##########
chart/values.schema.json:
##########
@@ -5734,6 +5634,98 @@
                     "type": "boolean",
                     "default": true
                 },
+                "httpRoute": {
+                    "description": "Kubernetes Gateway API (HTTPRoute) 
configuration for the API server.",
+                    "type": "object",
+                    "additionalProperties": false,
+                    "properties": {
+                        "enabled": {
+                            "description": "Enable API server HTTPRoute 
resource.",
+                            "type": "boolean",
+                            "default": false
+                        },
+                        "labels": {
+                            "description": "Extra labels for the API server 
HTTPRoute.",
+                            "type": "object",
+                            "default": {},
+                            "additionalProperties": {
+                                "type": "string"
+                            }
+                        },
+                        "annotations": {
+                            "description": "Annotations for the API server 
HTTPRoute.",
+                            "type": "object",
+                            "default": {},
+                            "additionalProperties": {
+                                "type": "string"
+                            }
+                        },
+                        "parentRefs": {
+                            "description": "List of parent Gateway references 
this HTTPRoute attaches to. Required when enabled.",

Review Comment:
   If required when enabled, we could specify that `minItems` is `1`, probably, 
and it should fail fast on wrong config



##########
chart/tests/chart_utils/helm_template_generator.py:
##########
@@ -138,9 +138,14 @@ def render_chart(
     chart_dir=None,
     kubernetes_version=DEFAULT_KUBERNETES_VERSION,
     namespace=None,
+    api_versions=None,
 ):
     """
     Function that renders a helm chart into dictionaries. For helm chart 
testing only
+
+    ``api_versions`` is passed to ``helm template --api-versions`` so that 
templates
+    gated on ``.Capabilities.APIVersions.Has`` (e.g. Gateway API CRDs) can be 
rendered
+    offline, where Helm cannot query a live cluster for installed API groups.

Review Comment:
   ```suggestion
   ```
   It is how this flag works, so I believe that we don't need specific 
documentation which copies official documentation



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