Skip to content

Add Gateway API HTTPRoute support to mattermost-team-edition chart#522

Open
somaz94 wants to merge 1 commit into
mattermost:masterfrom
somaz94:feat/team-edition-httproute
Open

Add Gateway API HTTPRoute support to mattermost-team-edition chart#522
somaz94 wants to merge 1 commit into
mattermost:masterfrom
somaz94:feat/team-edition-httproute

Conversation

@somaz94

@somaz94 somaz94 commented Jun 11, 2026

Copy link
Copy Markdown

Adds an optional Gateway API HTTPRoute resource to the mattermost-team-edition chart as an alternative to Ingress for routing external HTTP traffic to the Mattermost Service. Gated behind httproute.enabled (default false), so existing installs are unaffected. Chart version bumped 6.6.996.7.0 per the semver contribution requirement in CONTRIBUTING.

The new templates/httproute.yaml supports parentRefs, templated hostnames, annotations/labels, an httpsRedirect shortcut (HTTP→HTTPS 301), and pass-through additionalRules/filters/matches. backendRefs target the existing Service (mattermost-team-edition) on service.externalPort (8065), matching the Ingress backend.

Validation:

  • helm lint — 1 chart linted, 0 failed
  • helm template rendered for: disabled (no output), enabled with parentRefs + hostnames, httpsRedirect=true (RequestRedirect filter), and annotations/labels/matches/filters

Per CONTRIBUTING ("submit changes to multiple charts in separate PRs"), this covers only mattermost-team-edition; the mattermost-enterprise-edition chart can follow in a separate PR.

@mattermost-build

Copy link
Copy Markdown
Contributor

Hello @somaz94,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement?
Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

@somaz94

somaz94 commented Jun 11, 2026

Copy link
Copy Markdown
Author

/check-cla

@somaz94 somaz94 closed this Jun 11, 2026
@somaz94 somaz94 reopened this Jun 11, 2026
@somaz94

somaz94 commented Jun 11, 2026

Copy link
Copy Markdown
Author

/check-cla

1 similar comment
@somaz94

somaz94 commented Jun 11, 2026

Copy link
Copy Markdown
Author

/check-cla

@somaz94
somaz94 marked this pull request as ready for review June 11, 2026 06:26
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds Kubernetes Gateway API HTTPRoute support to the Mattermost team edition Helm chart, with new values, a rendering template, updated README entries, and a chart version bump to 6.7.0.

Changes

Gateway API HTTPRoute Support

Layer / File(s) Summary
HTTPRoute configuration schema
charts/mattermost-team-edition/values.yaml
New httproute values block defines enable/disable flag, API version/kind, optional metadata, routing attachment, hostname matching, HTTPS redirect behaviour, and extensibility hooks.
HTTPRoute template implementation
charts/mattermost-team-edition/templates/httproute.yaml
Helm template conditionally renders the HTTPRoute resource with metadata, optional parentRefs and hostnames, and either an HTTPS redirect rule or a backend-forwarding rule with optional custom rules and matchers.
Documentation and version update
charts/mattermost-team-edition/README.md, charts/mattermost-team-edition/Chart.yaml
Configuration docs add the new httproute.* parameters, and the chart version is bumped from 6.6.103 to 6.7.0.

Sequence Diagram(s)

sequenceDiagram
  participant HelmValues
  participant HTTPRouteTemplate
  participant KubernetesManifest
  HelmValues->>HTTPRouteTemplate: httproute.enabled, parentRefs, hostnames, rules
  HTTPRouteTemplate->>KubernetesManifest: render HTTPRoute metadata and spec
  HTTPRouteTemplate->>KubernetesManifest: emit redirect rule or backend forwarding rule
Loading

Estimated code review effort: 2 (Simple) | ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding Gateway API HTTPRoute support to the mattermost-team-edition chart.
Description check ✅ Passed The description is directly related to the chart changes and summarizes the new HTTPRoute support and validation steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
charts/mattermost-team-edition/templates/httproute.yaml (1)

29-44: 💤 Low value

Consider documenting the httpsRedirect behavior.

When httpsRedirect is true, the filters and matches values are ignored since the redirect rule doesn't include backend references. This is correct behaviour, but users might not expect it. Consider adding a comment in values.yaml (line 108-109) clarifying that enabling httpsRedirect creates a standalone redirect rule and that custom filters/matches should be added via additionalRules if needed alongside the redirect.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/mattermost-team-edition/templates/httproute.yaml` around lines 29 -
44, The template's httpsRedirect branch (see $route.httpsRedirect and the
RequestRedirect filter in httproute.yaml) creates a standalone redirect without
backendRefs, so users may be confused that their filters/matches are ignored;
update values.yaml to document that enabling httpsRedirect creates a
redirect-only rule, note that any custom filters/matches will be ignored for
that rule, and advise adding those via additionalRules (or disabling
httpsRedirect) if they need combined behavior; place the comment next to the
httpsRedirect and additionalRules keys so users see the guidance when editing
values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@charts/mattermost-team-edition/templates/httproute.yaml`:
- Around line 29-44: The template's httpsRedirect branch (see
$route.httpsRedirect and the RequestRedirect filter in httproute.yaml) creates a
standalone redirect without backendRefs, so users may be confused that their
filters/matches are ignored; update values.yaml to document that enabling
httpsRedirect creates a redirect-only rule, note that any custom filters/matches
will be ignored for that rule, and advise adding those via additionalRules (or
disabling httpsRedirect) if they need combined behavior; place the comment next
to the httpsRedirect and additionalRules keys so users see the guidance when
editing values.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 71ec83d9-ce1b-4a6b-b7a6-9e0c0d1786b4

📥 Commits

Reviewing files that changed from the base of the PR and between f2ee8ca and 26eb53f.

📒 Files selected for processing (4)
  • charts/mattermost-team-edition/Chart.yaml
  • charts/mattermost-team-edition/README.md
  • charts/mattermost-team-edition/templates/httproute.yaml
  • charts/mattermost-team-edition/values.yaml

@somaz94
somaz94 force-pushed the feat/team-edition-httproute branch from 26eb53f to aad198b Compare June 17, 2026 02:02
@somaz94
somaz94 force-pushed the feat/team-edition-httproute branch from aad198b to f8959fb Compare June 24, 2026 05:34
@mattermost-build

Copy link
Copy Markdown
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@somaz94

somaz94 commented Jul 8, 2026

Copy link
Copy Markdown
Author

This one picked up the Lifecycle/1:stale label but it's still ready for review — CI is green, the CLA is signed, and there are no conflicts. It adds opt-in Gateway API HTTPRoute support to the mattermost-team-edition chart, gated behind httproute.enabled (default off). Could a core team member take a first look when time allows? Happy to address any feedback. Thanks!

@somaz94
somaz94 force-pushed the feat/team-edition-httproute branch from cd69ad5 to f02bc72 Compare July 9, 2026 03:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
charts/mattermost-team-edition/templates/httproute.yaml (1)

19-21: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

parentRefs is required by the HTTPRoute spec but rendered as optional.

The HTTPRoute API specification requires parentRefs to be present. Using {{- with $route.parentRefs }} means the field is omitted entirely when not configured, producing an invalid resource that the Gateway API controller will reject. Consider either documenting that parentRefs must be provided when httproute.enabled is true, or adding a required validation in values.yaml.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/mattermost-team-edition/templates/httproute.yaml` around lines 19 -
21, The HTTPRoute template currently makes parentRefs optional via the
httproute.yaml rendering logic, but the HTTPRoute spec requires it to always be
present. Update the templating around $route.parentRefs so parentRefs cannot be
omitted when httproute.enabled is set, and add validation in values.yaml (or
equivalent chart checks) to require a non-empty parentRefs value. Make sure the
fix is tied to the existing httproute.enabled / $route.parentRefs flow so
invalid HTTPRoute manifests are not rendered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@charts/mattermost-team-edition/templates/httproute.yaml`:
- Around line 19-21: The HTTPRoute template currently makes parentRefs optional
via the httproute.yaml rendering logic, but the HTTPRoute spec requires it to
always be present. Update the templating around $route.parentRefs so parentRefs
cannot be omitted when httproute.enabled is set, and add validation in
values.yaml (or equivalent chart checks) to require a non-empty parentRefs
value. Make sure the fix is tied to the existing httproute.enabled /
$route.parentRefs flow so invalid HTTPRoute manifests are not rendered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1fd38b21-7c81-4126-b21d-e3e81c01c677

📥 Commits

Reviewing files that changed from the base of the PR and between cd69ad5 and f02bc72.

📒 Files selected for processing (4)
  • charts/mattermost-team-edition/Chart.yaml
  • charts/mattermost-team-edition/README.md
  • charts/mattermost-team-edition/templates/httproute.yaml
  • charts/mattermost-team-edition/values.yaml
✅ Files skipped from review due to trivial changes (2)
  • charts/mattermost-team-edition/Chart.yaml
  • charts/mattermost-team-edition/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/mattermost-team-edition/values.yaml

@somaz94
somaz94 force-pushed the feat/team-edition-httproute branch from f02bc72 to 09609d3 Compare July 24, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants