Skip to content

feat(helm): add Gateway API HTTPRoute support#574

Open
luqs1 wants to merge 7 commits intomainfrom
prebuild/httproutes
Open

feat(helm): add Gateway API HTTPRoute support#574
luqs1 wants to merge 7 commits intomainfrom
prebuild/httproutes

Conversation

@luqs1
Copy link
Collaborator

@luqs1 luqs1 commented Jan 7, 2026

Add support for Kubernetes Gateway API HTTPRoutes as an alternative to Ingress resources. When global.gatewayApi.enabled is true, HTTPRoutes are created instead of Ingress resources (mutually exclusive).

Features:

  • Global configuration for gateway name and namespace reference
  • HTTPRoute templates for agent-ontology, rag-redis, and rag-webui
  • Mutual exclusion logic between Ingress and HTTPRoute
  • Support for cross-namespace gateway references
  • Disabled by default for backwards compatibility
  • PathType mapping from Ingress (Prefix) to Gateway API (PathPrefix)

Also fixes bug in rag-webui ingress template where hostname wasn't extracted correctly from values structure.

🤖 Generated with Claude Code


Please ensure commits conform to the Commit Guideline

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Pre-release Helm Charts (Optional)

For chart changes, you can test pre-release versions before merging:

  • Base repo contributors: Create a branch starting with pre/ for automatic pre-release builds
  • Fork contributors: Ask a maintainer to add the helm-prerelease label
  • Pre-release charts are published to ghcr.io/cnoe-io/pre-release-helm-charts
  • Cleanup happens automatically when the PR closes or label is removed

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

Add support for Kubernetes Gateway API HTTPRoutes as an alternative to
Ingress resources. When global.gatewayApi.enabled is true, HTTPRoutes
are created instead of Ingress resources (mutually exclusive).

Features:
- Global configuration for gateway name and namespace reference
- HTTPRoute templates for agent-ontology, rag-redis, and rag-webui
- Mutual exclusion logic between Ingress and HTTPRoute
- Support for cross-namespace gateway references
- Disabled by default for backwards compatibility
- PathType mapping from Ingress (Prefix) to Gateway API (PathPrefix)

Also fixes bug in rag-webui ingress template where hostname wasn't
extracted correctly from values structure.

Signed-off-by: Luqmaan <luqmahme@cisco.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

📦 Pre-release Helm Charts Published

Registry: ghcr.io/cnoe-io/pre-release-helm-charts

rag-stack

Version: 0.0.7-httproutes-1

helm upgrade --install rag oci://ghcr.io/cnoe-io/pre-release-helm-charts/rag-stack --version 0.0.7-httproutes-1

ai-platform-engineering

Version: 0.5.15-httproutes-1

helm upgrade --install ai-platform oci://ghcr.io/cnoe-io/pre-release-helm-charts/ai-platform-engineering --version 0.5.15-httproutes-1

Note: These pre-release versions will be automatically cleaned up when the PR is closed or merged.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

📊 Test Coverage Report

Main Tests Coverage

Metric Coverage Details
Lines 46.5% 4066/8747 lines
Branches 0.0% 0/0 branches

📁 Coverage Artifacts

  • Main tests: coverage-reports-main artifact
  • RAG tests: coverage-reports-rag artifact (not available)
  • Download artifacts to view detailed HTML coverage reports

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1aabc977e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +28 to +32
rules:
{{- range .Values.ingress.hosts }}
{{- range .paths }}
- matches:
- path:

Choose a reason for hiding this comment

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

P2 Badge Preserve host-specific paths when generating HTTPRoutes

HTTPRoute hostnames are defined at the route level and apply to all rules. This template builds rules by iterating each host’s .paths (lines 28–32) after populating the hostnames list from all hosts, so if .Values.ingress.hosts contains multiple hosts with different path lists, every path becomes valid for every hostname. That changes routing behavior versus the Ingress template and can send requests for host B to paths intended only for host A. Consider creating separate HTTPRoute objects per host or grouping rules by hostname to keep paths scoped.

Useful? React with 👍 / 👎.

Comment on lines +28 to +32
rules:
{{- range .Values.ingress.hosts }}
{{- range .paths }}
- matches:
- path:

Choose a reason for hiding this comment

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

P2 Badge Preserve host-specific paths when generating HTTPRoutes

As written, rules are generated by iterating each host’s .paths (lines 28–32), but hostnames are specified at the route level and apply to all rules. If .Values.ingress.hosts contains multiple hosts with different paths, those paths become shared across all hostnames, changing behavior compared with the Ingress template. This can route host-specific paths to the wrong hostname. Consider emitting one HTTPRoute per host or otherwise scoping rules so host/path associations are preserved.

Useful? React with 👍 / 👎.

…support

This commit addresses two limitations in the Gateway API HTTPRoute implementation:

1. Per-service control for HTTPRoute rendering:
   - Added httproute.shouldRender helper to rag-stack subcharts (agent-ontology, rag-redis, rag-webui)
   - HTTPRoute now respects BOTH global.gatewayApi.enabled AND ingress.enabled flags
   - Users can now disable HTTPRoute for specific services while keeping Gateway API enabled globally

2. Gateway API support for main agent charts:
   - Added complete HTTPRoute support to supervisor-agent, agent (generic), and backstage-plugin-agent-forge
   - Implemented 6 new helper templates per chart:
     * gatewayApi.enabled - Check global Gateway API flag
     * gatewayApi.gatewayName - Get gateway name from global config
     * gatewayApi.gatewayNamespace - Get gateway namespace (defaults to release namespace)
     * gatewayApi.pathType - Map Ingress pathType to Gateway API pathType
     * httproute.shouldRender - Render when BOTH ingress.enabled AND gatewayApi enabled
     * ingress.shouldRender - Render when ingress.enabled AND gatewayApi NOT enabled
   - Created HTTPRoute templates for all 3 main agent charts
   - Updated ingress templates to use new shouldRender helper for mutual exclusivity

Testing:
- Verified mutual exclusivity (Ingress XOR HTTPRoute)
- Verified per-service HTTPRoute disable functionality
- Verified pathType mapping (Prefix → PathPrefix)
- Verified cross-namespace gateway references
- All helm template tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Luqmaan <luqmahme@cisco.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

📦 Pre-release Helm Charts Published

Registry: ghcr.io/cnoe-io/pre-release-helm-charts

rag-stack

Version: 0.0.7-httproutes-2

helm upgrade --install rag oci://ghcr.io/cnoe-io/pre-release-helm-charts/rag-stack --version 0.0.7-httproutes-2

ai-platform-engineering

Version: 0.5.15-httproutes-2

helm upgrade --install ai-platform oci://ghcr.io/cnoe-io/pre-release-helm-charts/ai-platform-engineering --version 0.5.15-httproutes-2

Note: These pre-release versions will be automatically cleaned up when the PR is closed or merged.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

📊 Test Coverage Report

Main Tests Coverage

Metric Coverage Details
Lines 46.5% 4066/8747 lines
Branches 0.0% 0/0 branches

📁 Coverage Artifacts

  • Main tests: coverage-reports-main artifact
  • RAG tests: coverage-reports-rag artifact (not available)
  • Download artifacts to view detailed HTML coverage reports

luqs1 and others added 2 commits January 12, 2026 20:43
Resolved version conflicts:
- Adopted automated versioning scheme (0.2.8) from main
- Removed Chart.lock files per main branch changes
- Retained HTTPRoute feature changes from prebuild/httproutes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

📊 Test Coverage Report

Main Tests Coverage

Metric Coverage Details
Lines 46.5% 4066/8747 lines
Branches 0.0% 0/0 branches

📁 Coverage Artifacts

  • Main tests: coverage-reports-main artifact
  • RAG tests: coverage-reports-rag artifact (not available)
  • Download artifacts to view detailed HTML coverage reports

@github-actions
Copy link
Contributor

📊 Test Coverage Report

Main Tests Coverage

Metric Coverage Details
Lines 46.5% 4066/8747 lines
Branches 0.0% 0/0 branches

📁 Coverage Artifacts

  • Main tests: coverage-reports-main artifact
  • RAG tests: coverage-reports-rag artifact (not available)
  • Download artifacts to view detailed HTML coverage reports

@github-actions
Copy link
Contributor

📊 Test Coverage Report

Main Tests Coverage

Metric Coverage Details
Lines 46.5% 4066/8747 lines
Branches 0.0% 0/0 branches

📁 Coverage Artifacts

  • Main tests: coverage-reports-main artifact
  • RAG tests: coverage-reports-rag artifact (not available)
  • Download artifacts to view detailed HTML coverage reports

@luqs1 luqs1 force-pushed the prebuild/httproutes branch from 18a84df to 4dc48fb Compare January 20, 2026 13:51
@github-actions
Copy link
Contributor

📊 Test Coverage Report

Main Tests Coverage

Metric Coverage Details
Lines 48.1% 4122/8577 lines
Branches 0.0% 0/0 branches

📁 Coverage Artifacts

  • Main tests: coverage-reports-main artifact
  • RAG tests: coverage-reports-rag artifact (not available)
  • Download artifacts to view detailed HTML coverage reports

@github-actions
Copy link
Contributor

📊 Test Coverage Report

Main Tests Coverage

Metric Coverage Details
Lines 48.1% 4122/8577 lines
Branches 0.0% 0/0 branches

📁 Coverage Artifacts

  • Main tests: coverage-reports-main artifact
  • RAG tests: coverage-reports-rag artifact (not available)
  • Download artifacts to view detailed HTML coverage reports

@github-actions
Copy link
Contributor

📊 Test Coverage Report

Main Tests Coverage

Metric Coverage Details
Lines 48.1% 4122/8577 lines
Branches 0.0% 0/0 branches

📁 Coverage Artifacts

  • Main tests: coverage-reports-main artifact
  • RAG tests: coverage-reports-rag artifact (not available)
  • Download artifacts to view detailed HTML coverage reports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant