diff --git a/stable/coredns/Chart.yaml b/stable/coredns/Chart.yaml index b73a84c02b..d33ac0e607 100644 --- a/stable/coredns/Chart.yaml +++ b/stable/coredns/Chart.yaml @@ -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: diff --git a/stable/coredns/templates/configmap.yaml b/stable/coredns/templates/configmap.yaml index ac606f2c05..eccd995092 100644 --- a/stable/coredns/templates/configmap.yaml +++ b/stable/coredns/templates/configmap.yaml @@ -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 }} diff --git a/stable/coredns/templates/deployment.yaml b/stable/coredns/templates/deployment.yaml index dddac673ef..b83678d740 100644 --- a/stable/coredns/templates/deployment.yaml +++ b/stable/coredns/templates/deployment.yaml @@ -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 }} diff --git a/stable/coredns/templates/rbac.yaml b/stable/coredns/templates/rbac.yaml index 4347789dd9..1400b96b34 100644 --- a/stable/coredns/templates/rbac.yaml +++ b/stable/coredns/templates/rbac.yaml @@ -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 diff --git a/stable/coredns/templates/service.yaml b/stable/coredns/templates/service.yaml index bd7bf62288..85d0a9c695 100644 --- a/stable/coredns/templates/service.yaml +++ b/stable/coredns/templates/service.yaml @@ -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 }}