diff --git a/.ci/scripts/kind-setup.sh b/.ci/scripts/kind-setup.sh index f4cde228efc..d2c9eeeb771 100755 --- a/.ci/scripts/kind-setup.sh +++ b/.ci/scripts/kind-setup.sh @@ -14,5 +14,10 @@ nodes: bind-address: "0.0.0.0" port: "10251" secure-port: "10259" + controllerManager: + extraArgs: + bind-address: "0.0.0.0" + port: "10252" + secure-port: "10257" EOF kubectl cluster-info diff --git a/deploy/kubernetes/Jenkinsfile.yml b/deploy/kubernetes/Jenkinsfile.yml index e953925a728..4f6c06d8f56 100644 --- a/deploy/kubernetes/Jenkinsfile.yml +++ b/deploy/kubernetes/Jenkinsfile.yml @@ -18,5 +18,5 @@ stages: make check-no-changes; stage: lint k8sTest: - k8sTest: "v1.20.7,v1.19.11,v1.18.2,v1.17.2,v1.16.4,v1.15.7,v1.14.10" + k8sTest: "v1.20.7,v1.19.11,v1.18.2,v1.17.2,v1.14.10" stage: mandatory diff --git a/metricbeat/docs/modules/kubernetes.asciidoc b/metricbeat/docs/modules/kubernetes.asciidoc index 042c972f6c5..dc7581ff79b 100644 --- a/metricbeat/docs/modules/kubernetes.asciidoc +++ b/metricbeat/docs/modules/kubernetes.asciidoc @@ -144,7 +144,8 @@ roleRef: [float] === Compatibility -The Kubernetes module is tested with Kubernetes 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, and 1.18.x +The Kubernetes module is tested with the following versions of Kubernetes: +1.14.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x [float] === Dashboard diff --git a/metricbeat/module/kubernetes/_meta/docs.asciidoc b/metricbeat/module/kubernetes/_meta/docs.asciidoc index daba6d728a6..11fc568d010 100644 --- a/metricbeat/module/kubernetes/_meta/docs.asciidoc +++ b/metricbeat/module/kubernetes/_meta/docs.asciidoc @@ -137,7 +137,8 @@ roleRef: [float] === Compatibility -The Kubernetes module is tested with Kubernetes 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, and 1.18.x +The Kubernetes module is tested with the following versions of Kubernetes: +1.14.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x [float] === Dashboard diff --git a/metricbeat/module/kubernetes/controllermanager/controllermanager_integration_test.go b/metricbeat/module/kubernetes/controllermanager/controllermanager_integration_test.go index f07bb7b1071..285242ebb03 100644 --- a/metricbeat/module/kubernetes/controllermanager/controllermanager_integration_test.go +++ b/metricbeat/module/kubernetes/controllermanager/controllermanager_integration_test.go @@ -29,7 +29,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config := test.GetAPIServerConfig(t, "controllermanager") + config := test.GetControllerManagerConfig(t, "controllermanager") metricSet := mbtest.NewFetcher(t, config) events, errs := metricSet.FetchEvents() if len(errs) > 0 { diff --git a/metricbeat/module/kubernetes/test/integration.go b/metricbeat/module/kubernetes/test/integration.go index 207f3ff2dd1..6966e82406c 100644 --- a/metricbeat/module/kubernetes/test/integration.go +++ b/metricbeat/module/kubernetes/test/integration.go @@ -75,7 +75,7 @@ func GetKubeProxyConfig(t *testing.T, metricSetName string) map[string]interface } } -// GetSchedulerConfig function returns configuration for talking to kube-proxy. +// GetSchedulerConfig function returns configuration for talking to kube-scheduler. func GetSchedulerConfig(t *testing.T, metricSetName string) map[string]interface{} { t.Helper() return map[string]interface{}{ @@ -85,3 +85,14 @@ func GetSchedulerConfig(t *testing.T, metricSetName string) map[string]interface "hosts": []string{"localhost:10251"}, } } + +// GetControllerManagerConfig function returns configuration for talking to kube-controller-manager. +func GetControllerManagerConfig(t *testing.T, metricSetName string) map[string]interface{} { + t.Helper() + return map[string]interface{}{ + "module": "kubernetes", + "metricsets": []string{metricSetName}, + "host": "${NODE_NAME}", + "hosts": []string{"localhost:10252"}, + } +}