Skip to content

Commit

Permalink
Fix k8s test versions (#36031)
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark committed Jul 11, 2023
1 parent 2428a9f commit 7dfbf89
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 35 deletions.
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",
}
}

0 comments on commit 7dfbf89

Please sign in to comment.