Skip to content

feat: add support for service-specific labels#250

Open
v4l3nt1tx wants to merge 5 commits intocoredns:masterfrom
v4l3nt1tx:feat/service-labeling
Open

feat: add support for service-specific labels#250
v4l3nt1tx wants to merge 5 commits intocoredns:masterfrom
v4l3nt1tx:feat/service-labeling

Conversation

@v4l3nt1tx
Copy link

@v4l3nt1tx v4l3nt1tx commented Feb 10, 2026

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

This PR adds support for service-specific labels to the CoreDNS Helm chart:

  • service.labels: Allows users to add custom labels exclusively to the Service resource (in addition to existing customLabels which apply to all resources). This is useful for service mesh integration, monitoring configurations, or cloud provider-specific annotations without affecting pods, deployments, or other resources.

The implementation introduces a new coredns.service.labels value that properly merges service.labels with customLabels, ensuring predictable label precedence and avoiding conflicts.

All changes are fully backward compatible with existing configurations.

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.

Valentin Thomas added 4 commits February 10, 2026 17:36
Signed-off-by: Valentin Thomas <valentinthomas@Valentins-MacBook-Pro.local>
Signed-off-by: Valentin Thomas <valentinthomas@Valentins-MacBook-Pro.local>
Signed-off-by: Valentin Thomas <valentinthomas@Valentins-MacBook-Pro.local>
Signed-off-by: Valentin Thomas <valentinthomas@Valentins-MacBook-Pro.local>
@v4l3nt1tx v4l3nt1tx changed the title Feat/service labeling feat: service labeling Feb 10, 2026
@v4l3nt1tx v4l3nt1tx changed the title feat: service labeling feat: add support for service-specific labels Feb 10, 2026
Signed-off-by: Valentin Thomas <valentinthomas@Valentins-MacBook-Pro.local>
name: {{ default (include "coredns.fullname" .) .Values.service.name }}
namespace: {{ .Release.Namespace }}
labels: {{- include "coredns.labels" . | nindent 4 }}
{{- if .Values.customLabels }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this deleted?

Copy link
Author

@v4l3nt1tx v4l3nt1tx Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it is directly merged in the helpers in the coredns.service.labels template https://github.com/coredns/helm/pull/250/changes#diff-66b1ea94bd58fba716f9bc62273485fe77cfc6ef9dd249a8acbf7888117f11f3R242
Is this ok for you @mrueg ?

@v4l3nt1tx
Copy link
Author

Are you waiting for some other informations @mrueg ?

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