From b0d175bf5c51a9179f438a7b6ec8aef8a1e34fcf Mon Sep 17 00:00:00 2001 From: Liz Rice Date: Tue, 4 Aug 2020 14:40:12 +0100 Subject: [PATCH] Update default Kubernetes to 1.18 (#657) * Update default Kubernetes to 1.18 * Add missing mapping * Show pod logs on failure --- cmd/common_test.go | 1 + cmd/root.go | 2 +- integration/integration.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/common_test.go b/cmd/common_test.go index 6af0f3f..1a230fd 100644 --- a/cmd/common_test.go +++ b/cmd/common_test.go @@ -213,6 +213,7 @@ func TestMapToCISVersion(t *testing.T) { {kubeVersion: "1.15", succeed: true, exp: "cis-1.5"}, {kubeVersion: "1.16", succeed: true, exp: "cis-1.5"}, {kubeVersion: "1.17", succeed: true, exp: "cis-1.5"}, + {kubeVersion: "1.18", succeed: true, exp: "cis-1.5"}, {kubeVersion: "gke-1.0", succeed: true, exp: "gke-1.0"}, {kubeVersion: "ocp-3.10", succeed: true, exp: "rh-0.7"}, {kubeVersion: "ocp-3.11", succeed: true, exp: "rh-0.7"}, diff --git a/cmd/root.go b/cmd/root.go index 6bb3d32..33c3819 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -34,7 +34,7 @@ type FilterOpts struct { var ( envVarsPrefix = "KUBE_BENCH" - defaultKubeVersion = "1.11" + defaultKubeVersion = "1.18" kubeVersion string benchmarkVersion string cfgFile string diff --git a/integration/integration.go b/integration/integration.go index 914a8d8..abd310d 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -113,10 +113,10 @@ func findPodForJob(clientset *kubernetes.Clientset, jobName string, duration tim if cp.Status.Phase == apiv1.PodFailed { fmt.Printf("pod (%s) - %s - retrying...\n", cp.Name, cp.Status.Phase) + fmt.Printf(getPodLogs(clientset, &cp)) failedPods[cp.Name] = struct{}{} break podfailed } - } } }