mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-03-03 10:10:52 +00:00
Merge pull request #248 from nak3/add-required-flag
Add validation for the required flag
This commit is contained in:
@@ -80,6 +80,9 @@ func (npdo *NodeProblemDetectorOptions) ValidOrDie() {
|
||||
panic(fmt.Sprintf("apiserver-override %q is not a valid HTTP URI: %v",
|
||||
npdo.ApiServerOverride, err))
|
||||
}
|
||||
if len(npdo.SystemLogMonitorConfigPaths) == 0 && len(npdo.CustomPluginMonitorConfigPaths) == 0 {
|
||||
panic(fmt.Sprintf("Either --system-log-monitors or --custom-plugin-monitors is required"))
|
||||
}
|
||||
}
|
||||
|
||||
// SetNodeNameOrDie sets `NodeName` field with valid value.
|
||||
|
||||
Reference in New Issue
Block a user