From e43b6f0128f3573dc689a9ea6101df4a83eb8227 Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Mon, 18 Oct 2021 09:52:33 -0700 Subject: [PATCH] Remove log-test pod if validation succeeds The validation function validate_kubectl_logs, which may be executed as part of genesis or cluster join, creates a log-test pod and checks that the 'kubectl logs' output is correct. These completed pods don't really need to live in the cluster beyond the initial deployment. This change deletes the log-test pod if the validation is successful. Change-Id: I6ae9c55f960ea70335d1fd79380c7119dc11a5e2 --- promenade/templates/include/utils.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/promenade/templates/include/utils.sh b/promenade/templates/include/utils.sh index bb290eac..ea3f62e0 100644 --- a/promenade/templates/include/utils.sh +++ b/promenade/templates/include/utils.sh @@ -250,5 +250,7 @@ EOPOD log Got unexpected logs: kubectl --namespace $NAMESPACE logs $POD_NAME 1>&2 fail + else + kubectl delete pods -n "$NAMESPACE" "$POD_NAME" fi }