Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix k8s test versions #36031

Merged
merged 3 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions .ci/scripts/kind-setup.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
#!/usr/bin/env bash
set -exuo pipefail

kind create cluster --image kindest/node:${K8S_VERSION} --config - <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
scheduler:
extraArgs:
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
kind create cluster --image kindest/node:${K8S_VERSION}
kubectl cluster-info
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pipeline {
SNAPSHOT = 'true'
TERRAFORM_VERSION = "0.13.7"
XPACK_MODULE_PATTERN = '^x-pack\\/[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*'
KIND_VERSION = 'v0.11.1'
KIND_VERSION = 'v0.15.0'
K8S_VERSION = 'v1.21.1'
}
options {
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ stages:
make check-no-changes;
stage: lint
k8sTest:
k8sTest: "v1.21.1,v1.20.7,v1.19.11,v1.18.19,v1.17.17,v1.14.10"
k8sTest: "v1.21.14,v1.20.15,v1.19.16"
stage: mandatory
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/kubernetes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ roleRef:
=== Compatibility

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
1.19.x, 1.20.x, 1.21.x

[float]
=== Dashboard
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/kubernetes/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ roleRef:
=== Compatibility

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
1.19.x, 1.20.x, 1.21.x

[float]
=== Dashboard
Expand Down
24 changes: 12 additions & 12 deletions metricbeat/module/kubernetes/test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,24 @@ func GetKubeProxyConfig(t *testing.T, metricSetName string) map[string]interface
func GetSchedulerConfig(t *testing.T, metricSetName string) map[string]interface{} {
t.Helper()
return map[string]interface{}{
"module": "kubernetes",
"metricsets": []string{metricSetName},
"host": "${NODE_NAME}",
"hosts": []string{"http://0.0.0.0:10251"},
"module": "kubernetes",
"metricsets": []string{metricSetName},
"host": "${NODE_NAME}",
"hosts": []string{"https://0.0.0.0:10259"},
"bearer_token_file": "/var/run/secrets/kubernetes.io/serviceaccount/token",
"ssl.verification_mode": "none",
}
}

// 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{"https://0.0.0.0:10257"},
"bearer_token_file": "/var/run/secrets/kubernetes.io/serviceaccount/token",
"ssl": map[string]interface{}{
"verification_mode": "none",
},
"module": "kubernetes",
"metricsets": []string{metricSetName},
"host": "${NODE_NAME}",
"hosts": []string{"https://0.0.0.0:10257"},
"bearer_token_file": "/var/run/secrets/kubernetes.io/serviceaccount/token",
"ssl.verification_mode": "none",
}
}
Loading