Move ReadonlyFilesystem to separate config file

Moved the ReadonlyFilesystem Node Condition to a separate plugin
configuration file and updated NPD to contain the appropiate new flags.
This commit is contained in:
Veer Singh
2024-10-09 00:20:49 -07:00
parent dc4200d805
commit ee955f9170
8 changed files with 57 additions and 16 deletions
@@ -64,6 +64,30 @@ data:
}
]
}
readonly-monitor.json: |
{
"plugin": "kmsg",
"logPath": "/dev/kmsg",
"lookback": "5m",
"bufferSize": 10,
"source": "readonly-monitor",
"metricsReporting": true,
"conditions": [
{
"type": "ReadonlyFilesystem",
"reason": "FilesystemIsNotReadOnly",
"message": "Filesystem is not read-only"
}
],
"rules": [
{
"type": "permanent",
"condition": "ReadonlyFilesystem",
"reason": "FilesystemIsReadOnly",
"pattern": "Remounting filesystem read-only"
}
]
}
docker-monitor.json: |
{
"plugin": "journald",
@@ -28,7 +28,7 @@ spec:
command:
- /node-problem-detector
- --logtostderr
- --config.system-log-monitor=/config/kernel-monitor.json,/config/docker-monitor.json
- --config.system-log-monitor=/config/kernel-monitor.json,/config/readonly-monitor.json,/config/docker-monitor.json
- --config.custom-plugin-monitor=/config/health-checker-kubelet.json
image: registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.19
resources:
@@ -86,6 +86,8 @@ spec:
items:
- key: kernel-monitor.json
path: kernel-monitor.json
- key: readonly-monitor.json
path: readonly-monitor.json
- key: docker-monitor.json
path: docker-monitor.json
- name: machine-id
+3 -1
View File
@@ -28,7 +28,7 @@ spec:
command:
- /node-problem-detector
- --logtostderr
- --config.system-log-monitor=/config/kernel-monitor.json,/config/docker-monitor.json
- --config.system-log-monitor=/config/kernel-monitor.json,/config/readonly-monitor.json,/config/docker-monitor.json
image: registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.19
resources:
limits:
@@ -78,6 +78,8 @@ spec:
items:
- key: kernel-monitor.json
path: kernel-monitor.json
- key: readonly-monitor.json
path: readonly-monitor.json
- key: docker-monitor.json
path: docker-monitor.json
tolerations: