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 scheduler and controllermanager k8s tests #30872

Merged
merged 1 commit into from
Mar 16, 2022
Merged
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
Update integration.go
ChrsMark authored Mar 16, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 61d0c77aeb6f8caf90f1202f3758d02b43ecead3
24 changes: 16 additions & 8 deletions metricbeat/module/kubernetes/test/integration.go
Original file line number Diff line number Diff line change
@@ -79,20 +79,28 @@ 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{"localhost: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": map[string]interface{}{
"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{"localhost:10252"},
"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",
},
}
}