mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/coredns] use .name in app label, not fullname (#6093)
* coredns: use .name in app label, not fullname Follow conventions in other charts, where the deployment name is not part of app label. Result: `app: coredns`, not `app: mydeploy-coredns` Signed-off-by: Min RK <benjaminrk@gmail.com> * coredns: bump chart version Signed-off-by: Min RK <benjaminrk@gmail.com> * coredns: apply labels consistently Signed-off-by: Min RK <benjaminrk@gmail.com> * coredns: always define app label not just when it's not a cluster service Signed-off-by: Min RK <benjaminrk@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: coredns
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
appVersion: 1.2.0
|
||||
description: CoreDNS is a DNS server that chains plugins and provides Kubernetes DNS Services
|
||||
keywords:
|
||||
|
||||
@@ -2,6 +2,16 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "coredns.fullname" . }}
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
||||
{{- if .Values.isClusterService }}
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "CoreDNS"
|
||||
{{- end }}
|
||||
app: {{ template "coredns.name" . }}
|
||||
data:
|
||||
Corefile: |-
|
||||
{{ range .Values.servers }}
|
||||
|
||||
@@ -10,26 +10,24 @@ metadata:
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "CoreDNS"
|
||||
{{- else }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
{{- end }}
|
||||
app: {{ template "coredns.name" . }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
release: {{ .Release.Name | quote }}
|
||||
{{- if .Values.isClusterService }}
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
{{- else }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
{{- end }}
|
||||
app: {{ template "coredns.name" . }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- if .Values.isClusterService }}
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
{{- else }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
{{- end }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
|
||||
@@ -11,9 +11,8 @@ metadata:
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "CoreDNS"
|
||||
{{- else }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
{{- end }}
|
||||
app: {{ template "coredns.name" . }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRole
|
||||
@@ -27,9 +26,8 @@ metadata:
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "CoreDNS"
|
||||
{{- else }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
{{- end }}
|
||||
app: {{ template "coredns.name" . }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
@@ -54,9 +52,8 @@ metadata:
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "CoreDNS"
|
||||
{{- else }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
{{- end }}
|
||||
app: {{ template "coredns.name" . }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
|
||||
@@ -10,18 +10,17 @@ metadata:
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "CoreDNS"
|
||||
{{- else }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
{{- end }}
|
||||
app: {{ template "coredns.name" . }}
|
||||
annotations:
|
||||
{{ toYaml .Values.service.annotations | indent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
{{- if .Values.isClusterService }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
{{- if .Values.isClusterService }}
|
||||
k8s-app: {{ .Chart.Name | quote }}
|
||||
{{- else }}
|
||||
app: {{ template "coredns.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
app: {{ template "coredns.name" . }}
|
||||
{{- if .Values.service.clusterIP }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user