ricardomaraschini / oomhero

Kubernetes sidecar for memory usage tracking
Apache License 2.0
108 stars 10 forks source link

Possible monitor InitContainer with OOMHero? #12

Open zanhsieh opened 1 year ago

zanhsieh commented 1 year ago

Hello,

Thanks for such a great project.

Just curious if there is any example configuration for OOMHero to monitor initContainer OOMKilled case?

ricardomaraschini commented 1 year ago

Interesting question. I don't think you can as there is no way, as far as I know, of using sidecars for init containers. Init containers are meant to be something finite, I mean, more like a batch thing right ?

zanhsieh commented 1 year ago

Thanks for swift feedback. Yes, they are finite, but one of cases I hit is cp was OOMKilled before the main container kicking in. After investigation, I guess it was InitContainer pulling some helm chart from OCI registry (e.g. Google Artifactory Registry), extracting it, and then perform helm template ... | kubectl apply -f .... The case happened mostly on high network latency.