Skip to content

Commit 78e1c58

Browse files
authored
Add support for latest k8s versions (#29575)
1 parent 3a6bd25 commit 78e1c58

File tree

6 files changed

+17
-30
lines changed

6 files changed

+17
-30
lines changed

.ci/scripts/kind-setup.sh

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
#!/usr/bin/env bash
22
set -exuo pipefail
33

4-
kind create cluster --image kindest/node:${K8S_VERSION} --config - <<EOF
5-
kind: Cluster
6-
apiVersion: kind.x-k8s.io/v1alpha4
7-
nodes:
8-
- role: control-plane
9-
kubeadmConfigPatches:
10-
- |
11-
kind: ClusterConfiguration
12-
scheduler:
13-
extraArgs:
14-
bind-address: "0.0.0.0"
15-
port: "10251"
16-
secure-port: "10259"
17-
controllerManager:
18-
extraArgs:
19-
bind-address: "0.0.0.0"
20-
port: "10252"
21-
secure-port: "10257"
22-
EOF
4+
kind create cluster --image kindest/node:${K8S_VERSION}
235
kubectl cluster-info

CHANGELOG.next.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
124124
- Update k8s library {pull}29394[29394]
125125
- Add FIPS configuration option for all AWS API calls. {pull}28899[28899]
126126
- Add `default_region` config to AWS common module. {pull}29415[29415]
127+
- Add support for latest k8s versions v1.23 and v1.22 {pull}29575[29575]
127128

128129
*Auditbeat*
129130

deploy/kubernetes/Jenkinsfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ stages:
1818
make check-no-changes;
1919
stage: lint
2020
k8sTest:
21-
k8sTest: "v1.21.1,v1.20.7,v1.19.11,v1.18.19,v1.17.17,v1.14.10"
21+
k8sTest: "v1.23.0,v1.22.0,v1.21.1,v1.20.7,v1.19.11,v1.18.19"
2222
stage: mandatory

metricbeat/docs/modules/kubernetes.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ roleRef:
155155
=== Compatibility
156156

157157
The Kubernetes module is tested with the following versions of Kubernetes:
158-
1.14.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x
158+
1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x
159159

160160
[float]
161161
=== Dashboard

metricbeat/module/kubernetes/_meta/docs.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ roleRef:
146146
=== Compatibility
147147

148148
The Kubernetes module is tested with the following versions of Kubernetes:
149-
1.14.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x
149+
1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x
150150

151151
[float]
152152
=== Dashboard

metricbeat/module/kubernetes/test/integration.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,24 @@ func GetKubeProxyConfig(t *testing.T, metricSetName string) map[string]interface
7979
func GetSchedulerConfig(t *testing.T, metricSetName string) map[string]interface{} {
8080
t.Helper()
8181
return map[string]interface{}{
82-
"module": "kubernetes",
83-
"metricsets": []string{metricSetName},
84-
"host": "${NODE_NAME}",
85-
"hosts": []string{"localhost:10251"},
82+
"module": "kubernetes",
83+
"metricsets": []string{metricSetName},
84+
"host": "${NODE_NAME}",
85+
"hosts": []string{"https://0.0.0.0:10259"},
86+
"bearer_token_file": "/var/run/secrets/kubernetes.io/serviceaccount/token",
87+
"ssl.verification_mode": "none",
8688
}
8789
}
8890

8991
// GetControllerManagerConfig function returns configuration for talking to kube-controller-manager.
9092
func GetControllerManagerConfig(t *testing.T, metricSetName string) map[string]interface{} {
9193
t.Helper()
9294
return map[string]interface{}{
93-
"module": "kubernetes",
94-
"metricsets": []string{metricSetName},
95-
"host": "${NODE_NAME}",
96-
"hosts": []string{"localhost:10252"},
95+
"module": "kubernetes",
96+
"metricsets": []string{metricSetName},
97+
"host": "${NODE_NAME}",
98+
"hosts": []string{"https://0.0.0.0:10257"},
99+
"bearer_token_file": "/var/run/secrets/kubernetes.io/serviceaccount/token",
100+
"ssl.verification_mode": "none",
97101
}
98102
}

0 commit comments

Comments
 (0)