feat(chart): add hostAliases support to main, worker, and webhook-processor pods - #167
Open
Vishesh-Gupta wants to merge 1 commit into
Open
feat(chart): add hostAliases support to main, worker, and webhook-processor pods#167Vishesh-Gupta wants to merge 1 commit into
Vishesh-Gupta wants to merge 1 commit into
Conversation
…cessor pods Adds an optional hostAliases values.yaml key that gets templated into /etc/hosts on all three pod types. This is useful for self-hosted deployments where n8n's own OAuth/MCP clients (or other outbound requests) target n8n's own public hostname (N8N_HOST/WEBHOOK_URL) and would otherwise hairpin out through an external load balancer or tunnel and back in, which can break in restrictive network setups.
Vishesh-Gupta
force-pushed
the
feat/host-aliases-support
branch
from
July 7, 2026 17:02
84a3023 to
c3ef66d
Compare
Contributor
Author
|
@krider2010 can someone review this? I believe this would be a good addition |
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
Adds an optional
hostAliasesvalues.yaml key that's templated into/etc/hostson all three pod types (main,worker,webhook-processor), following the same{{- with .Values.X }}pattern already used fornodeSelector/tolerations/affinity.Motivation
When self-hosting n8n behind a tunnel/reverse-proxy setup (e.g. Cloudflare Tunnel, or a private-network SaaS connector), n8n's own outbound requests to its own public hostname (
N8N_HOST/WEBHOOK_URL) — for example the MCP OAuth server's discovery/token endpoints, which n8n's own OAuth client and third-party MCP clients hit at that public FQDN — have to leave the cluster/VPC and hairpin back in through the external ingress path. This can break in setups where:WEBHOOK_URLneeds a same-Host-header request served entirely inside the private network for latency/security reasons.hostAliaseslets operators pin the pod's own public hostname directly to an internal ClusterIP/private IP so this traffic never leaves the cluster, without needing external DNS changes.Changes
charts/n8n/templates/deployment-main.yaml,deployment-worker.yaml,deployment-webhook-processor.yaml: renderspec.hostAliasesfrom.Values.hostAliaseswhen set (no-op otherwise).charts/n8n/values.yaml: newhostAliases: []default with documentation comment and example.charts/n8n/values.schema.json: schema for the new key.Test plan
helm lint charts/n8npasses.helm templatewithhostAliasesset renders correctly onmain,worker(queue mode), andwebhook-processorpods.helm templatewith default values (nohostAliases) produces nohostAliaseskey in any pod spec — fully backward compatible.Summary by cubic
Adds optional
hostAliasesto the Helm chart to inject/etc/hostsentries for themain,worker, andwebhook-processorpods. This lets pods resolve n8n’s public hostname to an internal IP to avoid hairpinning through external ingress or tunnels..Values.hostAliases(default[], schema-validated) with docs invalues.yaml.spec.hostAliasesin all three deployments when set; no-op when unset.Written for commit c3ef66d. Summary will update on new commits.