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