Add existing monitors into the problem daemon registration hook.

This commit is contained in:
Xuewei Zhang
2019-05-20 15:16:14 -07:00
parent 63f0e35e56
commit a07176073a
9 changed files with 435 additions and 32 deletions

View File

@@ -25,11 +25,22 @@ import (
"k8s.io/node-problem-detector/pkg/custompluginmonitor/plugin"
cpmtypes "k8s.io/node-problem-detector/pkg/custompluginmonitor/types"
"k8s.io/node-problem-detector/pkg/problemdaemon"
"k8s.io/node-problem-detector/pkg/types"
"k8s.io/node-problem-detector/pkg/util"
"k8s.io/node-problem-detector/pkg/util/tomb"
)
const CustomPluginMonitorName = "custom-plugin-monitor"
func init() {
problemdaemon.Register(
CustomPluginMonitorName,
types.ProblemDaemonHandler{
CreateProblemDaemonOrDie: NewCustomPluginMonitorOrDie,
CmdOptionDescription: "Set to config file paths."})
}
type customPluginMonitor struct {
config cpmtypes.CustomPluginConfig
conditions []types.Condition