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

Helm chart should allow configuring resource requests #213

Closed
LucasRoesler opened this issue Jun 6, 2018 · 4 comments
Closed

Helm chart should allow configuring resource requests #213

LucasRoesler opened this issue Jun 6, 2018 · 4 comments

Comments

@LucasRoesler
Copy link
Member

Expected Behaviour

The Helm chart does not set nor allow setting the resource.request or resource.limit for any of the deployment objects. Each of the deployment objects should read a corresponding resources value to allow the user to set/modify the requests as appropriate to their cluster.

Current Behaviour

The resources are not set by a variable, they are not even hard coded values.

Possible Solution

Each deployment template should include these lines

          resources:
{{ toYaml .Values.<servicename>.resources | indent 10 }}

and we should set default values that match the yaml files,

resources:
  requests:
    memory: 250Mi
  limits:
    memory: 250Mi 

Context

I was creating a new openfaas cluster for benchmarking purposes and I could not configure the horizontal pod scaler because I could not set the resource requests.

@lihaiswu
Copy link
Contributor

lihaiswu commented Jul 2, 2019

Any update on this issue? Since our kubernetes cluster has not allowed to deploy objects without resource requests, i have to update resource for all objects. I'd like to just use the helm repo and override the resource by value.yaml.

When the fix will be merged to master? @LucasRoesler @alexellis

@alexellis
Copy link
Member

Happy to take a PR for this @lihaiswu or for someone else in the community to pick this up.

@LucasRoesler since we started generating the Prometheus config for armhf the 512Mi request is too large and I can't deploy OpenFaaS on a 1GB RPi anymore. It'd be great to set the requests value for Prometheus in the armhf values override to 128Mi for instance.

@LucasRoesler
Copy link
Member Author

Just noting, if someone wants to pick this up,

          resources:
            {{- .Values.<servicename>.resources | toYaml | nindent 12 }}

is the best way i have seen this done. The nindent 12 means you can indent that block "correctly". This would need to be added to each Deployment object and documented in the README

@lihaiswu
Copy link
Contributor

lihaiswu commented Jul 2, 2019

I just make change, but unable to push commit to private branch. I received 403. Do I need to request any permission.

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

No branches or pull requests

3 participants