zebrium/ze-kubernetes-collector

container "zlog-collector" requires resource limits

Closed this issue · 7 comments

suvl commented

We have an OPA agent running and, as everyone should, we have a requirement that all containers must specify resource limits. This is more than necessary to keep a cluster healthy. While installing the log collector, I got denied:

Error: admission webhook "validating-webhook.openpolicyagent.org" denied the request: container "zlog-collector" requires resource limits

You guys should really set this up. Any idea what good values would be for these limits?

suvl commented

Well, looking into the yamls, I noticed you already define memory limits for up to 1Gi. But cpu limits still triggered our OPA. Gonna set this to 1000m and check if it works.

Joao, thanks for raising the issue.

We haven’t deployed OPA on our kubernetes clusters yet. I am curious about what kind of configuration you use. Do you use default resource policy or use your own policy? It is a little strange that OPA complains CPU resource request is too low.

As to CPU resource, it really depends on how much logs are generated. We should provide a recommendation to users.

Brady

suvl commented

@bradyzebrium @zebrium
Hi Brady.
We have custom policies on top that require every deployed container to have both cpu and memory limits in place. We believe that is a requirement for a healthy cluster, specially when all our clusters are multitenant at the moment.
I understand you have stated the memory limits, is there a reason for requiring "unlimited" cpu?

Hi Joao, I have set cpu limit to 1000m. Please let me know if you have any issues.

Brady

suvl commented

/close
it now works like a charm