From 692df9e5b765932e55e43a1fcd3fedb127346a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Fri, 11 Sep 2020 14:07:47 +0200 Subject: [PATCH] changed selector label and added new labels to tests too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Bauer --- charts/podinfo/templates/_helpers.tpl | 3 +-- charts/podinfo/templates/tests/cache.yaml | 5 +---- charts/podinfo/templates/tests/fail.yaml | 5 +---- charts/podinfo/templates/tests/grpc.yaml | 5 +---- charts/podinfo/templates/tests/jwt.yaml | 5 +---- charts/podinfo/templates/tests/service.yaml | 5 +---- charts/podinfo/templates/tests/timeout.yaml | 5 +---- 7 files changed, 7 insertions(+), 26 deletions(-) diff --git a/charts/podinfo/templates/_helpers.tpl b/charts/podinfo/templates/_helpers.tpl index d7d723f..0eeb037 100644 --- a/charts/podinfo/templates/_helpers.tpl +++ b/charts/podinfo/templates/_helpers.tpl @@ -46,8 +46,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "podinfo.selectorLabels" -}} -app.kubernetes.io/name: {{ include "podinfo.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/name: {{ include "podinfo.fullname" . }} {{- end }} {{/* diff --git a/charts/podinfo/templates/tests/cache.yaml b/charts/podinfo/templates/tests/cache.yaml index e77217d..ed85651 100644 --- a/charts/podinfo/templates/tests/cache.yaml +++ b/charts/podinfo/templates/tests/cache.yaml @@ -4,10 +4,7 @@ kind: Pod metadata: name: {{ template "podinfo.fullname" . }}-cache-test-{{ randAlphaNum 5 | lower }} labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - app: {{ template "podinfo.name" . }} + {{- include "podinfo.labels" . | nindent 4 }} annotations: "helm.sh/hook": test "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/charts/podinfo/templates/tests/fail.yaml b/charts/podinfo/templates/tests/fail.yaml index ef9df64..a9f7f27 100644 --- a/charts/podinfo/templates/tests/fail.yaml +++ b/charts/podinfo/templates/tests/fail.yaml @@ -4,10 +4,7 @@ kind: Pod metadata: name: {{ template "podinfo.fullname" . }}-fault-test-{{ randAlphaNum 5 | lower }} labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - app: {{ template "podinfo.name" . }} + {{- include "podinfo.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/charts/podinfo/templates/tests/grpc.yaml b/charts/podinfo/templates/tests/grpc.yaml index 9ed36ae..20c3d2e 100644 --- a/charts/podinfo/templates/tests/grpc.yaml +++ b/charts/podinfo/templates/tests/grpc.yaml @@ -3,10 +3,7 @@ kind: Pod metadata: name: {{ template "podinfo.fullname" . }}-grpc-test-{{ randAlphaNum 5 | lower }} labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - app: {{ template "podinfo.name" . }} + {{- include "podinfo.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/charts/podinfo/templates/tests/jwt.yaml b/charts/podinfo/templates/tests/jwt.yaml index 2f8786e..a0bd4f8 100644 --- a/charts/podinfo/templates/tests/jwt.yaml +++ b/charts/podinfo/templates/tests/jwt.yaml @@ -3,10 +3,7 @@ kind: Pod metadata: name: {{ template "podinfo.fullname" . }}-jwt-test-{{ randAlphaNum 5 | lower }} labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - app: {{ template "podinfo.name" . }} + {{- include "podinfo.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/charts/podinfo/templates/tests/service.yaml b/charts/podinfo/templates/tests/service.yaml index 1550374..9551980 100644 --- a/charts/podinfo/templates/tests/service.yaml +++ b/charts/podinfo/templates/tests/service.yaml @@ -3,10 +3,7 @@ kind: Pod metadata: name: {{ template "podinfo.fullname" . }}-service-test-{{ randAlphaNum 5 | lower }} labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - app: {{ template "podinfo.name" . }} + {{- include "podinfo.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded diff --git a/charts/podinfo/templates/tests/timeout.yaml b/charts/podinfo/templates/tests/timeout.yaml index 05647d3..fbbad41 100644 --- a/charts/podinfo/templates/tests/timeout.yaml +++ b/charts/podinfo/templates/tests/timeout.yaml @@ -4,10 +4,7 @@ kind: Pod metadata: name: {{ template "podinfo.fullname" . }}-fault-test-{{ randAlphaNum 5 | lower }} labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - app: {{ template "podinfo.name" . }} + {{- include "podinfo.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded