armosec/armo-helm

armo-collector uses outdated CronJob version and crashes often

AlexanderBabel opened this issue · 4 comments

In my cluster the new armo-collector runs for like a day and has already passed 35 restarts in that time. I attached my logs for more insights. If you need a more detailed version or something else, I am happy to help.

Additionally, an outdated version of the CronJob resource is used. It should be replaced with the stable version (apiVersion: batch/v1beta1 -> apiVersion: batch/v1). The syntax is the same, but just keep in mind to add a check if the version is greater or equal to 1.21. This was the first version of Kubernetes that introduced the stable version for CronJobs.

Image version: 176
W1222 07:49:19.384873       1 client_config.go:614] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
W1222 07:49:19.717368       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
W1222 07:49:19.802224       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
E1222 07:49:19.895107       1 podwatch.go:413] GetOwnerData CustomResourceDefinitions: the server could not find the requested resource
W1222 07:49:19.978337       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
W1222 07:49:19.998960       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
W1222 07:49:20.085308       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
E1222 07:49:20.088605       1 podwatch.go:413] GetOwnerData CustomResourceDefinitions: the server could not find the requested resource
W1222 07:49:20.137013       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
W1222 07:49:20.194287       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
W1222 07:49:20.211720       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
2021/12/22 08:21:01 Got unexpected node from chan: <nil>
E1222 08:21:53.177232       1 servicewatch.go:135] Got unexpected service from chan: <nil>
Log level: 2, set -stderrthreshold=INFO for detailed logs

Again @AlexanderBabel sorry for the late answer.

@Bezbran is looking into this issue and will get back to you soon!

Thanks! Looking forward to help is you need something @Bezbran

Hi @AlexanderBabel ,we fixed it a few releases ago, sorry for not keeping you updated.
Can you please confirm the fix?

No comment, assuming this one was solved.