From 52dc4bce80af600783ef3ee46ae78afca1e1baf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Thu, 9 May 2019 13:50:48 +0200 Subject: [PATCH] [stable/coredns] Switch labels to best practices (#13310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://helm.sh/docs/chart_best_practices/#standard-labels https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels Signed-off-by: Manuel RĂ¼ger --- stable/coredns/Chart.yaml | 4 ++-- stable/coredns/templates/clusterrole.yaml | 8 ++++---- stable/coredns/templates/clusterrolebinding.yaml | 8 ++++---- stable/coredns/templates/configmap.yaml | 8 ++++---- stable/coredns/templates/deployment.yaml | 16 ++++++++-------- stable/coredns/templates/podsecuritypolicy.yaml | 8 ++++---- stable/coredns/templates/service.yaml | 12 ++++++------ stable/coredns/templates/serviceaccount.yaml | 8 ++++---- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/stable/coredns/Chart.yaml b/stable/coredns/Chart.yaml index 75fc6a755d..b6777f3f1c 100644 --- a/stable/coredns/Chart.yaml +++ b/stable/coredns/Chart.yaml @@ -1,6 +1,6 @@ name: coredns -version: 1.5.1 -appVersion: 1.5.1 +version: 1.5.2 +appVersion: 1.5.0 description: CoreDNS is a DNS server that chains plugins and provides Kubernetes DNS Services keywords: - coredns diff --git a/stable/coredns/templates/clusterrole.yaml b/stable/coredns/templates/clusterrole.yaml index a45c65b4a3..029d13e272 100644 --- a/stable/coredns/templates/clusterrole.yaml +++ b/stable/coredns/templates/clusterrole.yaml @@ -4,15 +4,15 @@ kind: ClusterRole metadata: name: {{ template "coredns.fullname" . }} labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/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" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} rules: - apiGroups: - "" diff --git a/stable/coredns/templates/clusterrolebinding.yaml b/stable/coredns/templates/clusterrolebinding.yaml index b9a5982a5b..49da9b5484 100644 --- a/stable/coredns/templates/clusterrolebinding.yaml +++ b/stable/coredns/templates/clusterrolebinding.yaml @@ -4,15 +4,15 @@ kind: ClusterRoleBinding metadata: name: {{ template "coredns.fullname" . }} labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/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" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/stable/coredns/templates/configmap.yaml b/stable/coredns/templates/configmap.yaml index eccd995092..b7e1a667fa 100644 --- a/stable/coredns/templates/configmap.yaml +++ b/stable/coredns/templates/configmap.yaml @@ -3,15 +3,15 @@ kind: ConfigMap metadata: name: {{ template "coredns.fullname" . }} labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/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" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} data: Corefile: |- {{ range .Values.servers }} diff --git a/stable/coredns/templates/deployment.yaml b/stable/coredns/templates/deployment.yaml index afd16c2e8f..84fc7ceb3d 100644 --- a/stable/coredns/templates/deployment.yaml +++ b/stable/coredns/templates/deployment.yaml @@ -3,32 +3,32 @@ kind: Deployment metadata: name: {{ template "coredns.fullname" . }} labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/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" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - release: {{ .Release.Name | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} {{- if .Values.isClusterService }} k8s-app: {{ .Chart.Name | quote }} {{- end }} - app: {{ template "coredns.name" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} template: metadata: labels: {{- if .Values.isClusterService }} k8s-app: {{ .Chart.Name | quote }} {{- end }} - app: {{ template "coredns.name" . }} - release: {{ .Release.Name | quote }} + app.kubernetes.io/name: {{ template "coredns.name" . }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- if .Values.isClusterService }} diff --git a/stable/coredns/templates/podsecuritypolicy.yaml b/stable/coredns/templates/podsecuritypolicy.yaml index eacb7ee228..c3d8b41d91 100644 --- a/stable/coredns/templates/podsecuritypolicy.yaml +++ b/stable/coredns/templates/podsecuritypolicy.yaml @@ -4,15 +4,15 @@ kind: PodSecurityPolicy metadata: name: {{ template "coredns.fullname" . }} labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- if .Values.isClusterService }} k8s-app: {{ .Chart.Name | quote }} kubernetes.io/cluster-service: "true" kubernetes.io/name: "CoreDNS" {{- else }} - app: {{ template "coredns.name" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} {{- end }} spec: privileged: false diff --git a/stable/coredns/templates/service.yaml b/stable/coredns/templates/service.yaml index cb7457ddd8..a2864f6354 100644 --- a/stable/coredns/templates/service.yaml +++ b/stable/coredns/templates/service.yaml @@ -3,24 +3,24 @@ kind: Service metadata: name: {{ template "coredns.fullname" . }} labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/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" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} annotations: {{ toYaml .Values.service.annotations | indent 4 }} spec: selector: - release: {{ .Release.Name | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} {{- if .Values.isClusterService }} k8s-app: {{ .Chart.Name | quote }} {{- end }} - app: {{ template "coredns.name" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} {{- if .Values.service.clusterIP }} clusterIP: {{ .Values.service.clusterIP }} {{- end }} diff --git a/stable/coredns/templates/serviceaccount.yaml b/stable/coredns/templates/serviceaccount.yaml index 6db7e291a4..bced7ca3df 100644 --- a/stable/coredns/templates/serviceaccount.yaml +++ b/stable/coredns/templates/serviceaccount.yaml @@ -4,13 +4,13 @@ kind: ServiceAccount metadata: name: {{ template "coredns.serviceAccountName" . }} labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/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" . }} + app.kubernetes.io/name: {{ template "coredns.name" . }} {{- end }}