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


##########
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:
   Done — I set `parentRefs` default to `~` (null) and added `minItems: 1` to 
the schema. This gives a two-layer guard:
   
   - **Schema** catches the explicit-empty-list case fail-fast: with the 
default `~`, `minItems: 1` only constrains actual arrays, so `enabled: true` + 
`parentRefs: []` now fails validation immediately, while the default disabled 
render (null) stays valid.
   - **Template guard** is kept for the `enabled: true` + `parentRefs: ~` 
(null) case — JSON Schema `minItems` can't catch null, and there's no 
`if`/`then` conditional precedent in `values.schema.json` to express "non-null 
when enabled" purely in schema.
   
   So the additional template logic stays minimal (just the null-while-enabled 
case); the empty-list case is now handled by the schema as you suggested.



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