StackStorm / stackstorm-k8s

K8s Helm Chart that codifies StackStorm (aka "IFTTT for Ops" https://stackstorm.com/) Highly Availability fleet as a simple to use reproducible infrastructure-as-code app
https://helm.stackstorm.com/
Apache License 2.0
105 stars 107 forks source link

Find resource Requests for all K8s pods/deployments #5

Closed arm4b closed 3 years ago

arm4b commented 6 years ago

Moved from https://github.com/StackStorm/k8s-st2/issues/25

Find resource requests and resource limits (at least Memory) for each container/pod in StackStorm cluster, allow modifying the values.

This is the best K8s practice which affects cluster capacity planning and so is must do for prod and all Deployment objects we write.

Capacity planning is based on defined K8s resources metadata and so it's important setting to configure. Another quick example if an app introduces memory leak or rabbitmq app acquires all the memory it can see. If such pods deployed to the cluster with no limit set they can crash a node.

Components

A few references

https://github.com/StackStorm/stackstorm-enterprise-ha/blob/9e3caf754b14f1a20efe45f43bc3037f9f09c649/templates/jobs.yaml#L95-L96

https://github.com/StackStorm/stackstorm-enterprise-ha/blob/9e3caf754b14f1a20efe45f43bc3037f9f09c649/values.yaml#L210-L216

arms11 commented 3 years ago

@armab - I am interested in helping here. How do you proceed with this as resource limits will vary per individual needs. We have decent monitoring in place where i can observe consistent average of CPU/MEM usage by various pods. I am guessing we are interested in resources value = minimum. Bitnami charts recommend not to specify limits as it may create unwanted behavior or pod crash. Your thoughts?

arm4b commented 3 years ago

@arms11 Yeah, you're right. We want the spec.containers[].resources.requests codified :+1: as that'll help with the Pod scheduling and better resource allocation between the nodes.