You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow setting requests/limits on init containers #368
I'm trying to deploy stackstorm-k8s into an environment that enforces resourcequota requiring limits to be defined to all containers and init containers. This environment does not provide a limit range or default namespace limits. It would be very helpful to be able to define resources and limits of the individual init containers or have a default values/limits set for them.
You can refer to st2web for other component configurations in values.yaml
st2web:
# Minimum 2 replicas are recommended to run st2web in HA mode
replicas: 2
# Tested resource consumption based on multiple requests to st2web within nginx
# Please adjust based on your conscious choice
resources:
requests:
memory: "25Mi"
cpu: "50m"
limits:
memory: "100Mi"
These are all pretty basic utility containers that do not need many resources. Is there a default we could put here? Or perhaps add a value like utilityResources (we have image.utilityImage to set the image, though we should not put resources under image)?
Activity
chain312 commentedon Mar 6, 2024
You can refer to st2web for other component configurations in values.yaml
cognifloyd commentedon Apr 11, 2024
PR welcome. You'll need to add the resources section to each of the init containers. I count 13 init containers defined in:
templates/deployments.yamlgenerate-htpasswd: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/deployments.yaml#L49init-config: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/deployments.yaml#L1177generate-st2client-config: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/deployments.yaml#L1619templates/jobs.yamlwait-for-api: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/jobs.yaml#L136generate-st2client-config: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/jobs.yaml#L150generate-st2client-config: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/jobs.yaml#L276st2-register-content-custom-init: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/jobs.yaml#L412generate-st2client-config: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/jobs.yaml#L645templates/_helpers.tpl, specifically the templates:stackstorm-ha.init-containers-wait-for-dbwait-for-db: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/_helpers.tpl#L197stackstorm-ha.init-containers-wait-for-mqwait-for-queue: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/_helpers.tpl#L218stackstorm-ha.packs-initContainers(there are 3 init containers in this template)st2-custom-pack: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/_helpers.tpl#L335st2-system-packs: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/_helpers.tpl#L357st2-pack-configs-from-helm: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/_helpers.tpl#L378These are all pretty basic utility containers that do not need many resources. Is there a default we could put here? Or perhaps add a value like
utilityResources(we haveimage.utilityImageto set the image, though we should not put resources underimage)?