mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-12-19 13:18:07 +00:00
Update default Kubernetes to 1.18 (#657)
* Update default Kubernetes to 1.18 * Add missing mapping * Show pod logs on failure
This commit is contained in:
parent
e69b2fe549
commit
b0d175bf5c
@ -213,6 +213,7 @@ func TestMapToCISVersion(t *testing.T) {
|
|||||||
{kubeVersion: "1.15", succeed: true, exp: "cis-1.5"},
|
{kubeVersion: "1.15", succeed: true, exp: "cis-1.5"},
|
||||||
{kubeVersion: "1.16", 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.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: "gke-1.0", succeed: true, exp: "gke-1.0"},
|
||||||
{kubeVersion: "ocp-3.10", succeed: true, exp: "rh-0.7"},
|
{kubeVersion: "ocp-3.10", succeed: true, exp: "rh-0.7"},
|
||||||
{kubeVersion: "ocp-3.11", succeed: true, exp: "rh-0.7"},
|
{kubeVersion: "ocp-3.11", succeed: true, exp: "rh-0.7"},
|
||||||
|
@ -34,7 +34,7 @@ type FilterOpts struct {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
envVarsPrefix = "KUBE_BENCH"
|
envVarsPrefix = "KUBE_BENCH"
|
||||||
defaultKubeVersion = "1.11"
|
defaultKubeVersion = "1.18"
|
||||||
kubeVersion string
|
kubeVersion string
|
||||||
benchmarkVersion string
|
benchmarkVersion string
|
||||||
cfgFile string
|
cfgFile string
|
||||||
|
@ -113,10 +113,10 @@ func findPodForJob(clientset *kubernetes.Clientset, jobName string, duration tim
|
|||||||
|
|
||||||
if cp.Status.Phase == apiv1.PodFailed {
|
if cp.Status.Phase == apiv1.PodFailed {
|
||||||
fmt.Printf("pod (%s) - %s - retrying...\n", cp.Name, cp.Status.Phase)
|
fmt.Printf("pod (%s) - %s - retrying...\n", cp.Name, cp.Status.Phase)
|
||||||
|
fmt.Printf(getPodLogs(clientset, &cp))
|
||||||
failedPods[cp.Name] = struct{}{}
|
failedPods[cp.Name] = struct{}{}
|
||||||
break podfailed
|
break podfailed
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user