feat(chart): add wildcard ingress support for mock server#64
Open
nahidhasan94 wants to merge 3 commits into
Open
feat(chart): add wildcard ingress support for mock server#64nahidhasan94 wants to merge 3 commits into
nahidhasan94 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
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.ingressvalues (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.
Contributor
There was a problem hiding this comment.
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 nomockServer.ingresskeys). 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wildcard subdomain ingress for the mock server so users can hit
<mock-id>.mock.example.com/pathinstead of wiring up routes tobackend:3170/mock/<mock-id>/pathmanually.Changes
mockServer.ingresssection in values.yaml (off by default, no impact on existing installs)controllerTypetoggleGoal
*.mock.example.com→ User ingress controllerTesting