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
This commit is contained in:
Phil Sphicas 2021-10-18 09:52:33 -07:00
parent 2f823c69d2
commit e43b6f0128
1 changed files with 2 additions and 0 deletions

View File

@ -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
}