Repository navigation
feat(helm): support dnsConfig on the forwarder deployment - #2124
Merged
Merged
Conversation
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@helm/robusta/templates/_helpers.tpl`:
- Around line 21-26: Update the dnsConfig validation around .enabled to tolerate
a null or missing configuration object and use the established default for
.policy when it is absent. For an effective policy of None, require .nameservers
to exist and be non-empty; do not accept only .searches or .options. Render
dnsPolicy using the resolved fallback policy so the template never emits an
empty value or panics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 835affbb-f52f-4a67-b9f7-6d7b1939b35b
📒 Files selected for processing (4)
helm/robusta/templates/_helpers.tplhelm/robusta/templates/forwarder.yamlhelm/robusta/templates/runner.yamlhelm/robusta/values.yaml
DrFaust92
force-pushed
the
dnsconfig-forwarder
branch
from
August 1, 2026 12:50
04e30f0 to
3a990f5
Compare
Contributor
Author
|
@arikalon1 ping |
DrFaust92
force-pushed
the
dnsconfig-forwarder
branch
from
August 9, 2026 00:24
3a990f5 to
9a69b8b
Compare
The runner Deployment already supported a configurable dnsPolicy / dnsConfig, but the forwarder (kubewatch) did not and was stuck on the implicit ClusterFirst policy. Extract the runner's inline dnsConfig logic into a shared `robusta.dnsConfig` helper (including the "None requires config" guard and the ClusterFirst fallback) and use it from both the runner and the forwarder. Add a matching `kubewatch.dnsConfig` block to values.yaml. Defaults are unchanged: dnsConfig.enabled is false, so both deployments still render `dnsPolicy: ClusterFirst`. The runner's rendered output is byte-for-byte identical. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address CodeRabbit feedback on the dnsConfig helper: - When dnsPolicy is "None", Kubernetes requires at least one nameserver (searches/options alone are rejected by the API server). Tighten the guard to require .nameservers specifically instead of any config field. - Tolerate a null/missing dnsConfig object (`and . .enabled`) and default .policy to "ClusterFirst" when unset, so the template never panics or emits an empty `dnsPolicy: ""`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DrFaust92
force-pushed
the
dnsconfig-forwarder
branch
from
September 5, 2026 04:07
9a69b8b to
2973d7d
Compare
arikalon1
approved these changes
Oct 20, 2026
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.
What
The runner Deployment already supports a configurable
dnsPolicy/dnsConfig(runner.dnsConfig.*), but the forwarder (kubewatch) does not — it's stuck on the implicitClusterFirstpolicy.This PR extracts the runner's inline dnsConfig logic into a shared
robusta.dnsConfighelper and uses it from both the runner and the forwarder, and adds a matchingkubewatch.dnsConfigblock tovalues.yaml.Why
Users who need custom DNS (e.g.
dnsPolicy: Nonewith explicit nameservers/searches, or customndotsoptions) can already configure it for the runner but had no way to do the same for the forwarder pod.Details
robusta.dnsConfighelper in_helpers.tpl— centralizes thednsPolicy, the optionaldnsConfigblock, the "Nonerequires at least one of nameservers/searches/options" guard, and theClusterFirstfallback.runner.yamlnow calls the helper (removes ~26 lines of inline logic).forwarder.yamlcalls the same helper beforecontainers:.values.yamlgains akubewatch.dnsConfigblock mirroringrunner.dnsConfig.Backwards compatibility
Defaults are unchanged (
dnsConfig.enabled: false), so both deployments still renderdnsPolicy: ClusterFirst. The runner's rendered output is byte-for-byte identical.Verified with
helm template:dnsPolicy: ClusterFirston both deploymentsenabled: true+policy: None+ nameservers → correctdnsConfignestingpolicy: Nonewith no config → still hard-fails via the guard🤖 Generated with Claude Code