feat(self-host): expose dnsConfig/dnsPolicy on component pods#541
Open
fer wants to merge 1 commit into
Open
Conversation
|
Thank you for your contribution! We've added this to our internal tracking system for review. Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process. |
|
keithhubner
reviewed
Jun 17, 2026
keithhubner
left a comment
Contributor
There was a problem hiding this comment.
branch now out of date and failed tests, please update branch.
mimartin12
requested changes
Jun 17, 2026
fer
force-pushed
the
feat/self-host-expose-dnsconfig
branch
from
July 2, 2026 15:44
dd467d7 to
b8715d6
Compare
Adds general.dnsConfig/dnsPolicy (with per-component overrides) rendered into each component Deployment pod spec, same pattern as nodeSelector/tolerations. Lets self-host clusters override pod DNS (e.g. ndots:2) so deployments with the kubelet default ndots:5 plus corporate search domains that return SERVFAIL can resolve cloud endpoints (identity/api.bitwarden.eu) for license/billing sync. The Alpine/musl getaddrinfo aborts the search on SERVFAIL where glibc would not. Includes generated values.schema.json and bumps chart 2.0.2 -> 2.1.0.
fer
force-pushed
the
feat/self-host-expose-dnsconfig
branch
from
July 2, 2026 15:48
b8715d6 to
f2f1168
Compare
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.



Problem
On clusters where the kubelet injects the default
options ndots:5and the pod inherits corporate DNS search domains, automatic licensing/billing sync fails. The 2-dot cloud endpoints (identity.bitwarden.eu,api.bitwarden.eu,selfhost.bitwarden.com) get search-expanded first; when the corporate resolver returns SERVFAIL for the bogus expanded name (e.g.identity.bitwarden.eu.corp.example), the Alpine/muslgetaddrinfoin our images aborts the entire lookup and never tries the real name. .NET surfaces it asSocketException 0xFFFDFFFF "Name does not resolve";nslookup/curluse a different resolver path and succeed, which makes it hard to diagnose. glibc does not abort on SERVFAIL during search — this is musl-specific and by design.Why a chart change
The fix is a standard Pod
dnsConfig(options: ndots:2), but the chart exposes nodnsConfig/dnsPolicyfield. The only workaround is an out-of-bandkubectl patch, whichhelm upgradeoverwrites.Change
Adds
general.dnsPolicy/general.dnsConfigwith per-component overrides undercomponent.<name>, rendered into each component Deployment's pod spec — same override pattern asnodeSelector/tolerations. Includesvalues.schema.jsonentries and bumps the chart2.0.1 -> 2.1.0(appVersionunchanged).Result:
Upgrade-safe, supported value instead of a manual patch.
Test plan
helm templatewith and withoutgeneral.dnsConfig→ block present/absent in each Deployment.general.helm lintpasses with the schema entries (validated).ndots:5+ a search domain whose resolver SERVFAILs the expanded name →getent hosts identity.bitwarden.euempty before, resolves after settingndots:2.Root-cause references
src/network/lookup_name.c—name_from_dnsreturnsEAI_AGAINon SERVFAIL (rcode 2),0on NXDOMAIN (rcode 3);name_from_dns_searchaborts on the non-zero return.src/native/libs/System.Native/pal_networking.c—SystemNative_GetHostEntryForNamecalls libcgetaddrinfodirectly.options ndots:5default;dnsConfig.options"merged to the options generated from the specified DNS policy. Duplicate entries are removed."