Skip to content
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
24 changes: 16 additions & 8 deletions metricbeat/module/kubernetes/test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}
}