Output of helm version:
Client: &version.Version{SemVer:"v2.16.0", GitCommit:"e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.0", GitCommit:"e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState:"clean"}
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-17T17:16:09Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.): Minikube
It would be great if helm test --cleanup --logs printed all container logs in each test pod. Currently this works fine for 1 container in a pod.
Rather than run test images that contain all the tools I need, I often create pods with a couple of containers that orchestrate the tests (e.g. redis-cli + python script + shared volume).
helm test [release] --cleanup --logs will error with:
RUNNING: my-test
FAILED: my-test, run kubectl logs my-test --namespace default for more info
ERROR: error in opening log stream, got: a container name must be specified for pod my-test, choose one of: [container-0 container-1]
I currently use a shell script as a workaround (can't find source of this anymore) like so:
helm_release=$1
helm test $helm_release
status=$?
test_pods=$(helm status $helm_release -o json | jq -r .info.status.last_test_suite_run.results[].name)
namespace=$(helm status $helm_release -o json | jq -r .namespace)
for test_pod in $test_pods; do
echo "Test Pod: $test_pod"
echo "============"
echo ""
kubectl -n $namespace logs --all-containers $test_pod
kubectl -n $namespace delete pod $test_pod
echo ""
echo "============"
done
exit $status
Notice that I'm running kubectl logs --all-containers to ensure I get all the logs from the pod.
Output of
helm version:Output of
kubectl version:Cloud Provider/Platform (AKS, GKE, Minikube etc.): Minikube
It would be great if
helm test --cleanup --logsprinted all container logs in each test pod. Currently this works fine for 1 container in a pod.Rather than run test images that contain all the tools I need, I often create pods with a couple of containers that orchestrate the tests (e.g. redis-cli + python script + shared volume).
helm test [release] --cleanup --logswill error with:RUNNING: my-test
FAILED: my-test, run
kubectl logs my-test --namespace defaultfor more infoERROR: error in opening log stream, got: a container name must be specified for pod my-test, choose one of: [container-0 container-1]
I currently use a shell script as a workaround (can't find source of this anymore) like so:
Notice that I'm running
kubectl logs --all-containersto ensure I get all the logs from the pod.