Skip to content

feat: add customAnnotations, dnsConfig, and podLabels support#246

Merged
hagaibarel merged 2 commits intocoredns:masterfrom
hligit:feat/pod-and-rbac-customization
Jan 22, 2026
Merged

feat: add customAnnotations, dnsConfig, and podLabels support#246
hagaibarel merged 2 commits intocoredns:masterfrom
hligit:feat/pod-and-rbac-customization

Conversation

@hligit
Copy link
Contributor

@hligit hligit commented Jan 19, 2026

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

This PR adds several new configuration options and optimizations to the CoreDNS Helm chart:

  • customAnnotations support for ClusterRole and ClusterRoleBinding: Allows users to add custom annotations to RBAC resources for better integration with tools like GitOps, policy controllers, or organizational standards.

  • dnsConfig: Enables custom DNS configuration for CoreDNS pods. When dnsConfig is specified, dnsPolicy is automatically set to None as required by Kubernetes. This is useful for avoiding circular DNS dependencies or using external DNS resolvers.

  • podLabels: Allows users to add custom labels specifically to pods (in addition to existing customLabels which apply to all resources). This is useful for pod-specific selectors, network policies, or monitoring configurations.

  • automountServiceAccountToken: Allow setting it to false to follow Kubernetes best practices of only specifying fields when overriding defaults.

All changes are fully backward compatible with existing configurations.

Which issues (if any) are related?

None

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.

Signed-off-by: Haitao Li <hli@atlassian.com>
@hagaibarel
Copy link
Collaborator

@hligit seems like the unit test install fails, probably because of helm-unittest/helm-unittest#790.

Can you please add a version pin the the lint-test workflow? It should be in https://github.com/coredns/helm/blob/master/.github/workflows/lint-test.yaml#L19-L20, and the change should be:

- name: Install helm-unittest plugin
   run: helm plugin install --version 1.0.2 https://github.com/helm-unittest/helm-unittest

@hagaibarel hagaibarel self-assigned this Jan 19, 2026
Signed-off-by: Haitao Li <hli@atlassian.com>
@hagaibarel hagaibarel merged commit bb61177 into coredns:master Jan 22, 2026
2 checks passed
@hagaibarel
Copy link
Collaborator

Thanks for the PR!

@hagaibarel hagaibarel mentioned this pull request Jan 22, 2026
4 tasks
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