Skip to content

feat: allow to redefine dnsPolicy#247

Merged
hagaibarel merged 1 commit intocoredns:masterfrom
pasteley:dnsPolicy
Jan 23, 2026
Merged

feat: allow to redefine dnsPolicy#247
hagaibarel merged 1 commit intocoredns:masterfrom
pasteley:dnsPolicy

Conversation

@pasteley
Copy link
Contributor

Why is this pull request needed and what does it do?

This PR makes dnsPolicy configurable via deployment.dnsPolicy and adds support for https://kubernetes.io/docs/reference/generated/kubernetes-api/latest#poddnsconfig-v1-core, enabling advanced DNS configurations (e.g., custom nameservers, search domains, ndots tuning)

Summary of changes:

  • Add deployment.dnsPolicy value (defaults to "Default" for backwards compatibility)
  • Add deployment.dnsConfig value for custom DNS settings
  • Add validation that fails if dnsPolicy=None without dnsConfig

Which issues (if any) are related?

None I am aware of

Checklist:

  • I have bumped the chart version according to versioning.
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.

Changes are automatically published when merged to main. They are not published on branches.

Note on DCO

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

@pasteley pasteley changed the title feat: allow to redifine dnsPolicy and dnsConfig feat: allow to redefine dnsPolicy and dnsConfig Jan 21, 2026
@hagaibarel
Copy link
Collaborator

Hi @pasteley , I think this was already included in #246, can you please review the PR again and adapt if it's still needed?

Signed-off-by: pasteley <ceasebeing@gmail.com>
@pasteley
Copy link
Contributor Author

Rebased, this PR adds validation on top (fails if dnsPolicy: None without dnsConfig) and gives users explicit control over dnsPolicy instead of auto-setting it

@pasteley pasteley changed the title feat: allow to redefine dnsPolicy and dnsConfig feat: allow to redefine dnsPolicy Jan 22, 2026
@hagaibarel hagaibarel merged commit 64409d1 into coredns:master Jan 23, 2026
2 checks passed
@hagaibarel
Copy link
Collaborator

Thanks for the PR!

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