Skip to content

feat(chart): add wildcard ingress support for mock server#64

Open
nahidhasan94 wants to merge 3 commits into
mainfrom
feat/mock-server-wildcard-ingress
Open

feat(chart): add wildcard ingress support for mock server#64
nahidhasan94 wants to merge 3 commits into
mainfrom
feat/mock-server-wildcard-ingress

Conversation

@nahidhasan94

Copy link
Copy Markdown
Collaborator

Summary

Wildcard subdomain ingress for the mock server so users can hit <mock-id>.mock.example.com/path instead of wiring up routes to backend:3170/mock/<mock-id>/path manually.

Changes

  • New mockServer.ingress section in values.yaml (off by default, no impact on existing installs)
  • New ingress template + helpers that auto-resolve the right service/port for both aio and distributed modes
  • Supports nginx, traefik, and ALB via a controllerType toggle
  • Traefik middleware CRD for path rewriting (only created when using traefik)
  • Helm unit tests + CI values

Goal

  • Wildcard DNS: *.mock.example.com → User ingress controller
  • Wildcard TLS cert if using HTTPS (cert-manager DNS01 works)

Testing

  • helm lint ✓
  • helm template renders correctly for all 3 controllers
  • unit tests pass for aio + distributed modes

@nahidhasan94 nahidhasan94 marked this pull request as draft June 5, 2026 04:31
@nahidhasan94 nahidhasan94 self-assigned this Jun 5, 2026

Copilot AI 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.

Pull request overview

Adds optional wildcard-subdomain Ingress support for Hoppscotch’s mock server, allowing requests to (<mock-id>).<mock-host>/<path> to be routed to the backend mock endpoints across AIO and distributed deployments.

Changes:

  • Introduces mockServer.ingress values (off by default) and new templates for Ingress plus Traefik Middleware.
  • Adds helpers to auto-select the correct service name/port and rewrite path prefix for AIO vs distributed modes.
  • Adds helm-unittest coverage and CI values, plus README documentation for configuration and controller-specific behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
charts/hoppscotch/values.yaml Adds new mockServer.ingress configuration block (disabled by default).
charts/hoppscotch/templates/mock-server/ingress.yaml New Ingress template supporting nginx/traefik/alb via controllerType.
charts/hoppscotch/templates/mock-server/traefik-middleware.yaml Creates Traefik Middleware CRD for path rewriting when using Traefik.
charts/hoppscotch/templates/_helpers.tpl Adds helpers for mock server service name/port selection and path prefix logic.
charts/hoppscotch/tests/mock_server_ingress_test.yaml Adds helm-unittest coverage for ingress rendering, annotations, TLS, and middleware creation.
charts/hoppscotch/README.md Documents the new wildcard ingress feature and configuration examples.
charts/hoppscotch/ci/aio-mock-server-values.yaml Adds CI values for rendering/testing the feature in AIO mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread charts/hoppscotch/templates/mock-server/ingress.yaml
Comment thread charts/hoppscotch/README.md Outdated
Comment thread charts/hoppscotch/README.md Outdated
Comment thread charts/hoppscotch/README.md Outdated
@nahidhasan94 nahidhasan94 requested a review from Copilot June 5, 2026 05:07
@nahidhasan94 nahidhasan94 marked this pull request as ready for review June 5, 2026 05:08

Copilot AI 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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

charts/hoppscotch/README.md:531

  • The generated parameters table in README.md does not list any of the new mockServer.ingress.* values (searching the table shows no mockServer.ingress keys). Since values.yaml adds a new documented section, README.md likely needs to be regenerated (e.g., via helm-docs) so the Parameters table stays in sync.
The TLS secret covers the wildcard host `*.mock.example.com`.

## Parameters

<!-- markdownlint-disable MD013 MD034 -->

### Global Parameters

Comment thread charts/hoppscotch/README.md.gotmpl
Comment thread charts/hoppscotch/templates/mock-server/ingress.yaml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants