From b4ea2afc19e8b3d5d7f2b9f640e7dfc5e1c97985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ortiz=20V=C3=A1squez?= Date: Mon, 27 Jan 2020 14:57:09 -0500 Subject: [PATCH 1/2] Updated test hook, and hook deleting policy for test pods --- charts/podinfo/templates/tests/grpc.yaml | 3 ++- charts/podinfo/templates/tests/jwt.yaml | 3 ++- charts/podinfo/templates/tests/service.yaml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/charts/podinfo/templates/tests/grpc.yaml b/charts/podinfo/templates/tests/grpc.yaml index 444155c..55f0323 100644 --- a/charts/podinfo/templates/tests/grpc.yaml +++ b/charts/podinfo/templates/tests/grpc.yaml @@ -8,7 +8,8 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version }} app: {{ template "podinfo.name" . }} annotations: - "helm.sh/hook": test-success + "helm.sh/hook": test + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded sidecar.istio.io/inject: "false" linkerd.io/inject: disabled appmesh.k8s.aws/sidecarInjectorWebhook: disabled diff --git a/charts/podinfo/templates/tests/jwt.yaml b/charts/podinfo/templates/tests/jwt.yaml index 7a8fa1e..1721e34 100644 --- a/charts/podinfo/templates/tests/jwt.yaml +++ b/charts/podinfo/templates/tests/jwt.yaml @@ -8,7 +8,8 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version }} app: {{ template "podinfo.name" . }} annotations: - "helm.sh/hook": test-success + "helm.sh/hook": test + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded sidecar.istio.io/inject: "false" linkerd.io/inject: disabled appmesh.k8s.aws/sidecarInjectorWebhook: disabled diff --git a/charts/podinfo/templates/tests/service.yaml b/charts/podinfo/templates/tests/service.yaml index 37f35cb..861b555 100644 --- a/charts/podinfo/templates/tests/service.yaml +++ b/charts/podinfo/templates/tests/service.yaml @@ -8,7 +8,8 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version }} app: {{ template "podinfo.name" . }} annotations: - "helm.sh/hook": test-success + "helm.sh/hook": test + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded sidecar.istio.io/inject: "false" linkerd.io/inject: disabled appmesh.k8s.aws/sidecarInjectorWebhook: disabled From 3802fb427a03ac31a0da1db0da6a2a62947e3356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ortiz=20V=C3=A1squez?= Date: Mon, 27 Jan 2020 14:59:11 -0500 Subject: [PATCH 2/2] Updated helm test, helm3 does not have --cleanup --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 22e3d5f..0a26abb 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,8 @@ helm upgrade --install --wait frontend \ --set backend=http://backend-podinfo:9898/echo \ podinfo/podinfo -helm test frontend --cleanup +# Test pods have hook-delete-policy: hook-succeeded +helm test frontend helm upgrade --install --wait backend \ --namespace test \