-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Detect OOMkilled status for the operator itself #939
Conversation
Hit kubernetes-sigs/controller-runtime#2362 in the tests, but the issue provides a workaround. |
Signed-off-by: Christian Zunker <christian@mondoo.com>
Signed-off-by: Christian Zunker <christian@mondoo.com>
Signed-off-by: Christian Zunker <christian@mondoo.com>
Signed-off-by: Christian Zunker <christian@mondoo.com>
Signed-off-by: Christian Zunker <christian@mondoo.com>
Try to detect OOMkilled status for the operator before it gets killed again. Report the status upstream and add it the MondooAuditConfig status. Signed-off-by: Christian Zunker <christian@mondoo.com>
Signed-off-by: Christian Zunker <christian@mondoo.com>
d0f6429
to
49890ca
Compare
@@ -70,7 +70,6 @@ func (mr *MetricsReconciler) Start(ctx context.Context) error { | |||
} | |||
|
|||
func (mr *MetricsReconciler) metricsLoop() { | |||
mr.log.Info("Updating metrics") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was filling up the logs. We don't have a debug level, so I removed it.
Signed-off-by: Christian Zunker <christian@mondoo.com>
4c78466
to
07ac777
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add an integration test for this? should be an easily reproducible scenario.
Signed-off-by: Christian Zunker <christian@mondoo.com>
07ac777
to
c19a205
Compare
Good call. The tests revealed some cases where the code wouldn't have updated the status correctly. |
4a26977
to
d5268ec
Compare
Signed-off-by: Christian Zunker <christian@mondoo.com>
d5268ec
to
7ad6a23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @czunker
This adds a Status Condition for the controller itself: