Skip to content

Add HTTPRoute (Gateway API) support to API server in Helm Chart#67675

Merged
jscheffl merged 3 commits into
apache:mainfrom
somaz94:feat/httproute-api-server
Jun 11, 2026
Merged

Add HTTPRoute (Gateway API) support to API server in Helm Chart#67675
jscheffl merged 3 commits into
apache:mainfrom
somaz94:feat/httproute-api-server

Conversation

@somaz94

@somaz94 somaz94 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Adds an optional HTTPRoute resource for the API server, gated by httpRoute.apiServer.enabled.
The chart only creates the route; the parent Gateway and Gateway API CRDs must be installed
out of band. Mirrors the existing ingress.apiServer.* shape so users can switch between
Ingress and HTTPRoute without rewiring the rest of the chart.

This is a first slice — flower / statsd / pgbouncer can follow once this shape is agreed.

Validation:

  • helm template renders correctly with default rule, custom rules override, hostnames + parentRefs.
  • helm template rejects malformed values (e.g. parentRefs[*].name missing) via values.schema.json.
  • chart_schema.py passes ("No problems").
  • 14 unit tests added under chart/tests/helm_tests/apiserver/test_httproute_apiserver.py.

related: #61452


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

@boring-cyborg

boring-cyborg Bot commented May 29, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@somaz94 somaz94 marked this pull request as draft May 29, 2026 02:06
@jscheffl jscheffl added the backport-to-chart/v1-2x-test Automatic backport to chart 1.2x maintenance branch label May 29, 2026
@somaz94 somaz94 marked this pull request as ready for review June 4, 2026 05:26
@somaz94

somaz94 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Gentle ping 🙏 CI has been green for about a week now. Would really appreciate a review when someone has a moment — the change mirrors the chart's existing Ingress convention and is fully gated behind a disabled-by-default httpRoute.enabled flag (a no-op unless explicitly opted in). Happy to adjust anything.

@jscheffl jscheffl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks good to me. Content wise good and tests are added.

One thig that should be changed prior merge is that we must not add new deprecations. Can you please clean this?

Other reviewer opinions?

Comment thread chart/values.yaml Outdated
@potiuk

potiuk commented Jun 9, 2026

Copy link
Copy Markdown
Member

@somaz94 A few things need addressing before review — see our Pull Request quality criteria.

  • Helm tests. See docs.
  • Pre-commit / static checks. See docs.

No rush.

Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@jscheffl jscheffl merged commit 742f9a7 into apache:main Jun 11, 2026
107 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: chart/v1-2x-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
chart/v1-2x-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 742f9a7 chart/v1-2x-test

This should apply the commit to the chart/v1-2x-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

@boring-cyborg

boring-cyborg Bot commented Jun 11, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@jscheffl jscheffl added this to the Airflow Helm Chart 1.23.0 milestone Jun 11, 2026
jscheffl added a commit that referenced this pull request Jun 11, 2026
…in Helm Chart (#67675) (#68406)

* Add HTTPRoute (Gateway API) support to API server in Helm Chart

* Fix HTTPRoute helm tests by vendoring Gateway API CRD schema

* Remove deprecated httpRoute.enabled toggle and fix static checks
(cherry picked from commit 742f9a7)

Co-authored-by: somaz <112675579+somaz94@users.noreply.github.com>

@Miretpl Miretpl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit late, but it would be worth it to consider some things before the upcoming release.

Comment thread chart/values.yaml
Comment on lines +338 to +340
httpRoute:
# Configs for the HTTPRoute of the API Server (Airflow 3+)
apiServer:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we invert this to be under apiServer like apiServer.httpRoute? I don't see really a reason why it would be a global setting 🤔

##################################
## Airflow API Server HTTPRoute
##################################
{{- if and .Values.apiServer.enabled .Values.httpRoute.apiServer.enabled }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it requires a custom resource installed in the cluster, could we detect if it is installed with a Helm Capabilities check?

Comment on lines +29 to +33
def test_should_pass_validation_with_just_httproute_enabled(self):
render_chart(
values={"httpRoute": {"apiServer": {"enabled": True}}},
show_only=SHOW_ONLY,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add some asserts here.

Comment on lines +78 to +79
assert jmespath.search("spec.parentRefs[*].name", docs[0]) == ["main-gateway", "main-gateway"]
assert jmespath.search("spec.parentRefs[1].sectionName", docs[0]) == "https"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert jmespath.search("spec.parentRefs[*].name", docs[0]) == ["main-gateway", "main-gateway"]
assert jmespath.search("spec.parentRefs[1].sectionName", docs[0]) == "https"
assert jmespath.search("spec.parentRefs, docs[0]) == [
{"name": "main-gateway", "namespace": "gateway-system"},
{"name": "main-gateway", "namespace": "gateway-system", "sectionName": "https"}
]

this way we will be sure that the whole structure is correct.

similar comment to the other test cases too

Comment on lines +137 to +142
custom_rules = [
{
"matches": [{"path": {"type": "PathPrefix", "value": "/admin"}}],
"backendRefs": [{"name": "external-admin", "port": 8443}],
},
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is not used despite one place, so it is rather not needed.

Comment on lines +155 to +168
@pytest.mark.parametrize(
("api_server_value", "expected"),
[
(None, False),
(False, False),
(True, True),
],
)
def test_httproute_created(self, api_server_value, expected):
values = {"httpRoute": {}}
if api_server_value is not None:
values["httpRoute"]["apiServer"] = {"enabled": api_server_value}
docs = render_chart(values=values, show_only=SHOW_ONLY)
assert bool(docs) is expected

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would separate it into two different test cases to remove the if logic from inside the test. If it fails, it will make it harder to debug the error.

##################################
## Airflow API Server HTTPRoute
##################################
{{- if and .Values.apiServer.enabled .Values.httpRoute.apiServer.enabled }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be an alternative to the Ingress? If yes, we should probably add some checks if both are not enabled at the same time, etc.

@jscheffl

Copy link
Copy Markdown
Contributor

A bit late, but it would be worth it to consider some things before the upcoming release.

All good points that it seems I over-looked in review. @somaz94 can you make a follow-up PR?

imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Jun 16, 2026
…he#67675)

* Add HTTPRoute (Gateway API) support to API server in Helm Chart

* Fix HTTPRoute helm tests by vendoring Gateway API CRD schema

* Remove deprecated httpRoute.enabled toggle and fix static checks
dingo4dev pushed a commit to dingo4dev/airflow that referenced this pull request Jun 16, 2026
…he#67675)

* Add HTTPRoute (Gateway API) support to API server in Helm Chart

* Fix HTTPRoute helm tests by vendoring Gateway API CRD schema

* Remove deprecated httpRoute.enabled toggle and fix static checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart backport-to-chart/v1-2x-test Automatic backport to chart 1.2x maintenance branch kind:documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants