mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-28 01:47:20 +00:00
Fix invalid config JSON and enforce canonical config format
config/disk-log-message-filelog.json contained trailing commas and no trailing newline, so it could not be parsed by encoding/json and NPD would fail to start when configured with it. - Fix the invalid JSON - Add TestShippedConfigs, which verifies that every shipped JSON config under config/ (top level and one directory down) parses (catching trailing commas, UTF-8 BOMs and other syntax errors) and is in the canonical format (2-space indent, trailing newline), showing a diff on failure - Add `make fmt-configs` to rewrite nonconforming files in place (UPDATE_EXPECTED=y) - Normalize the existing config files to the canonical format (whitespace-only changes)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"apiEndpoint": "monitoring.googleapis.com:443",
|
||||
"exportPeriod": "60s",
|
||||
"metadataFetchTimeout": "600s",
|
||||
"metadataFetchInterval": "10s",
|
||||
"panicOnMetadataFetchFailure": false,
|
||||
"customMetricPrefix": ""
|
||||
"apiEndpoint": "monitoring.googleapis.com:443",
|
||||
"exportPeriod": "60s",
|
||||
"metadataFetchTimeout": "600s",
|
||||
"metadataFetchInterval": "10s",
|
||||
"panicOnMetadataFetchFailure": false,
|
||||
"customMetricPrefix": ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user