You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "younsl (via GitHub)" <gi...@apache.org> on 2026/10/18 14:49:56 UTC

[PR] fix(networking): route a hostless Ingress to every host [superset-kubernetes-operator]

younsl opened a new pull request, #461:
URL: https://github.com/apache/superset-kubernetes-operator/pull/461

   ## Summary
   
   When spec.networking.ingress sets neither host nor hosts, for example only className: alb, the operator builds an Ingress with no rules and no default backend. The Kubernetes API server rejects that object, so every reconcile fails and no Ingress is ever created. Both fields are optional in the CRD, and the className only example in the migration guide hits this. Running an Ingress without a hostname is a common setup with AWS Load Balancer Controller and ingress-nginx. This PR emits a single rule with an empty host in that case. An empty host matches every hostname, and the rule gets the same per-component path fan-out that a host without explicit paths already gets.
   
   ## Details
   
   - Controller: when hosts is empty and host is unset, reconcileIngress now builds one rule with no host instead of zero rules. Specs that set host or hosts render exactly as before, so existing Ingresses do not change.
   - The Gateway API path already handles empty hostnames, so this also brings Ingress in line with it.
   - The existing Ingress unit tests use a fake client, which skips API server validation. That is why this was not caught.
   - Unit test: TestReconcileIngress_HostlessFanout checks a className only spec produces one rule with an empty host that routes / to the web server and /mcp to the MCP server.
   - e2e: the journey test now removes the Ingress host on a real cluster and checks that the rule has an empty host and still carries the /ws, /mcp, and /flower paths, before it switches to Gateway API.
   - Docs: the networking guide now describes the hostless behavior.
   
   Verification: make lint-go (0 issues), make lint-md, make test-unit and make test-integration (all packages pass), go vet with the integration tag, and the e2e suite on Kind. The new e2e step fails against an operator built from main and passes with this change (17 of 17 specs).
   
   <details>
   <summary>Kind reproduction and e2e result</summary>
   
   Before the fix (operator built from main, same e2e test)
   
   The operator logs this error on every reconcile after the host is removed:
   
   ```
   "msg":"Reconciler error", ... "error":"reconciling Networking: Ingress.networking.k8s.io \"test-journey\" is invalid: spec: Invalid value: null: either `defaultBackend` or `rules` must be specified"
   ```
   
   The Ingress keeps its old host rule, so the new step times out:
   
   ```
   [FAILED] Timed out after 60.001s.
   Expected
       <string>: superset-e2e.example.com
   to equal
       <string>:
   FAIL! -- 14 Passed | 1 Failed | 0 Pending | 2 Skipped
   ```
   
   After the fix
   
   e2e journey step:
   
   ```
   STEP: dropping the Ingress host
   running: "kubectl patch superset test-journey -n superset-operator-system --type json -p [{\"op\":\"remove\",\"path\":\"/spec/networking/ingress/host\"}]"
   running: "kubectl get ingress test-journey -n superset-operator-system -o jsonpath={.spec.rules[0].host}"
   running: "kubectl get ingress test-journey -n superset-operator-system -o jsonpath={.spec.rules[0].http.paths[*].path}"
   STEP: switching networking from Ingress to Gateway
   ```
   
   Suite result:
   
   ```
   Ran 17 of 17 Specs in 101.978 seconds
   SUCCESS! -- 17 Passed | 0 Failed | 0 Pending | 0 Skipped
   ok  	github.com/apache/superset-kubernetes-operator/test/e2e	102.492s
   ```
   
   </details>
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(networking): route a hostless Ingress to every host [superset-kubernetes-operator]

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro merged PR #461:
URL: https://github.com/apache/superset-kubernetes-operator/pull/461


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(networking): route a hostless Ingress to every host [superset-kubernetes-operator]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #461:
URL: https://github.com/apache/superset-kubernetes-operator/pull/461#issuecomment-6252989419

   ## [Codecov](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/461?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 93.18%. Comparing base ([`d119eb3`](https://app.codecov.io/gh/apache/superset-kubernetes-operator/commit/d119eb3ddca2f321473bd1d69b5c3d9c006b587e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`04c18aa`](https://app.codecov.io/gh/apache/superset-kubernetes-operator/commit/04c18aa4cfeea34b195ec9bb1441694e939dec36?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/461?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org