Open agracie opened 1 year ago
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"
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.yaml
generate-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.yaml
wait-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-db
wait-for-db
: https://github.com/StackStorm/stackstorm-k8s/blob/master/templates/_helpers.tpl#L197stackstorm-ha.init-containers-wait-for-mq
wait-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 have image.utilityImage
to set the image, though we should not put resources under image
)?
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.