Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: coredns
version: 1.45.2
version: 1.45.3
appVersion: 1.13.1
home: https://coredns.io
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
Expand All @@ -20,4 +20,4 @@ type: application
annotations:
artifacthub.io/changes: |
- kind: added
description: Add configurable dnsPolicy for deployment
description: Support for service labels
1 change: 1 addition & 0 deletions charts/coredns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ The command removes all the Kubernetes components associated with the chart and
| `service.externalTrafficPolicy` | Enable client source IP preservation | [] |
| `service.ipFamilyPolicy` | Service dual-stack policy | `""` |
| `service.annotations` | Annotations to add to service | {} |
| `service.labels` | Labels to add to service | {} |
| `service.selector` | Pod selector | `{}` |
| `service.trafficDistribution` | Service traffic routing strategy | |
| `serviceAccount.create` | If true, create & use serviceAccount | false |
Expand Down
10 changes: 10 additions & 0 deletions charts/coredns/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,13 @@ Create the name of the service account to use
{{ template "coredns.fullname" . }}
{{- end -}}
{{- end -}}

{{/*
Generate the service labels
*/}}
{{- define "coredns.service.labels" -}}
{{- $labels := merge (.Values.service.labels | default dict) (.Values.customLabels | default dict) }}
{{- with $labels }}
{{ toYaml . }}
{{- end }}
{{- end }}
4 changes: 1 addition & 3 deletions charts/coredns/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ metadata:
name: {{ default (include "coredns.fullname" .) .Values.service.name }}
namespace: {{ .Release.Namespace }}
labels: {{- include "coredns.labels" . | nindent 4 }}
{{- if .Values.customLabels }}
Copy link
Copy Markdown
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
Copy Markdown
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 ?

{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
{{- include "coredns.service.labels" . | indent 4 }}
{{- if or .Values.service.annotations .Values.customAnnotations }}
annotations:
{{- if .Values.service.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/coredns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ service:
# If not set, a name is generated using the fullname template
name: ""
annotations: {}
labels: {}
# Pod selector
selector: {}

Expand Down
Loading