Skip to content
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

Resource limits for spark dependencies cronjob #598

Closed
harshal-shah opened this issue Aug 20, 2019 · 7 comments · Fixed by #620
Closed

Resource limits for spark dependencies cronjob #598

harshal-shah opened this issue Aug 20, 2019 · 7 comments · Fixed by #620

Comments

@harshal-shah
Copy link

The spark dependencies cronjob does not have resources populated. It would be nice to be able to specify requests and limits for the pods created by this cronjob.
Right now the pods created by this cronjob do not have any resources defined and they consume a substantial amount of CPU / memory causing resource starvation on the node and all pods on it.

@antimack
Copy link

+1 to this, we have default requests and limits per namespace and spark dependencies OOM killed all the time

@harshal-shah
Copy link
Author

@antimack as a workaround, you can add a LimitRange object to the namespace where jaeger is installed.

@antimack
Copy link

@harshal-shah Yeah, that’s what we do but we have default limitrange same for all the namespaces and we are trying to keep it low so spark dependencies failing to start. I just tweaked limitrange a bit but having the ability to specify resources in crd would be way much better :)

@harshal-shah
Copy link
Author

Yes, Totally agree with that.

@jpkrohling
Copy link
Contributor

@rubenvp8510 is this something you'd want to work on?

@harshal-shah
Copy link
Author

We removed the limitrange and instead used the following helmfile hook to patch the cronjob

    hooks:
    - events: ["postsync"]
      showlogs: true
      command: "kubectl"
      args: ["patch", "cronjob", "jaeger-spark-dependencies", "-n", "tracing", "--type", "merge", "--patch", "{ \"spec\": { \"jobTemplate\": { \"spec\": { \"template\": { \"spec\": { \"containers\": [ { \"name\": \"jaeger-spark-dependencies\", \"image\": \"jaegertracing/spark-dependencies\", \"resources\": { \"requests\":{ \"cpu\": \"2000m\", \"memory\": \"4Gi\" }, \"limits\":{ \"cpu\": \"2500m\", \"memory\": \"6Gi\" } } } ] } } } } } }"]

@harshal-shah
Copy link
Author

Above patch gets overwritten by the operator

W0826 08:33:55.753589       1 reflector.go:256] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:93: watch of *v1beta1.CronJob ended with: too old resource version: 198112976 (198121115)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants