somaz94 commented on code in PR #68552:
URL: https://github.com/apache/airflow/pull/68552#discussion_r3471763895
##########
chart/values.yaml:
##########
@@ -290,50 +290,6 @@ ingress:
# The Ingress Class for the PgBouncer Ingress
Review Comment:
Done — added a note on `ingress.apiServer.enabled` pointing to
`apiServer.httpRoute.enabled` as the mutually-exclusive alternative.
##########
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:
Done — added a "mutually exclusive with `ingress.apiServer.enabled`" note on
the `apiServer.httpRoute` block.
##########
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:
Good point on failing fast. I looked at `minItems: 1` on the schema, but
`parentRefs` defaults to `[]` in `values.yaml` and Helm validates the merged
values against the schema on every `helm template`/`lint` — so an unconditional
`minItems: 1` would fail the default (HTTPRoute-disabled) render for the whole
chart, and this schema has no conditional (`if`/`then`) validation precedent.
Instead I added a template guard that fails when `httpRoute.enabled` is `true`
but `parentRefs` is empty (alongside the existing CRD / ingress-conflict
guards), making `parentRefs` effectively required-when-enabled. Updated the
render tests to supply a minimal `parentRefs` and added a negative test
`test_should_fail_when_parent_refs_empty`. Happy to switch to a conditional
schema instead if you'd prefer.
--
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]