Move apiserver-reporting logic into k8s_exporter.

Added CLI option "enable-k8s-exporter" (default to true). Users can use
this option to enable/disable exporting to Kubernetes control plane.

This commit also removes all the apiserver-specific logic from package
problemdetector.

Future exporters (e.g. to local journald, Prometheus, other control
planes) should implement types.Exporter interface.
This commit is contained in:
Xuewei Zhang
2019-06-12 18:29:18 -07:00
parent df2bc3df22
commit 5814195ad5
10 changed files with 130 additions and 63 deletions
+6
View File
@@ -107,3 +107,9 @@ type Monitor interface {
// Stop stops the log monitor.
Stop()
}
// Exporter exports machine health data to certain control plane.
type Exporter interface {
// Export problems to the control plane.
ExportProblems(*Status)
}