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

Env configuration for resource quota/limit are ignored #46

Closed
whitingjr opened this issue May 26, 2023 · 4 comments
Closed

Env configuration for resource quota/limit are ignored #46

whitingjr opened this issue May 26, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@whitingjr
Copy link

Describe the bug
None of the container platform resources are configured with any limit/quota.

To Reproduce
Steps to reproduce the behavior:

$ helm install eapfoo --debug -f app.yaml -f values.yaml -n default --repo https://jbossas.github.io/eap-charts eap-xp4

Please include if possible the debug output to get the values provided to the chart with

Here we can see the deployer configured with cpu 2000m.

$ helm install eapfoo --debug -f app.yaml -f values.yaml -n default --repo https://jbossas.github.io/eap-charts eap-xp4 |grep -B 5 cpu
install.go:194: [debug] Original chart version: ""
install.go:211: [debug] CHART PATH: /home/whitingjr/.cache/helm/repository/eap-xp4-1.0.0.tgz

client.go:133: [debug] creating 8 resource(s)
  uri: https://github.com/hpehl/first-responder-demo.git
deploy:
  containers:
  - resources:
      requests:
        cpu: 2000m
--
  - name: MP_MESSAGING_CONNECTOR_SMALLRYE_KAFKA_BOOTSTRAP_SERVERS
    value: frdemo-kafka:9092
  maxReplicas: 10
  metrics:
  - resource:
      name: cpu
--
  uri: https://github.com/hpehl/first-responder-demo.git
deploy:
  containers:
  - resources:
      requests:
        cpu: 2000m
--
      port: admin
    initialDelaySeconds: 60
  maxReplicas: 10
  metrics:
  - resource:
      name: cpu

Expected behavior
At least one resource with a cpu 2000m limit.

Component Versions(please complete the following information):

$ helm version
version.BuildInfo{Version:"v3.11", GitCommit:"", GitTreeState:"", GoVersion:"go1.19.6"}
$ oc version
Client Version: 4.12.0-202304070941.p0.g31aa3e8.assembly.stream-31aa3e8
Kustomize Version: v4.5.7
Server Version: 4.10.43
Kubernetes Version: v1.23.12+8a6bfe4
$

Additional context

@whitingjr whitingjr added the bug Something isn't working label May 26, 2023
@whitingjr
Copy link
Author

this is the app.yaml

@jmesnil
Copy link
Contributor

jmesnil commented May 30, 2023

Your app.yaml contains fields that are not taken into account by the Helm Chart.

The only field that the Helm Chart will use is deploy.resources that will be applied to the Deployment's container for EAP (in https://github.com/jmesnil/wildfly-charts/blob/fcaf516e2879e597a3a0d6f7570cf9fedf59a67b/charts/wildfly-common/templates/_deployment.yaml#L68). The fields are documented in https://github.com/jbossas/eap-charts/blob/eap74/charts/eap74/README.md#deploying-the-application

If you use the YAML:

deploy:
  resources:
    requests:
      cpu: 2000m
      memory: 1500Mi

this should work.

Having said that, the Helm chart does not allow for the configuration of your other settings (minReplicas, maxReplicas, metrics, scaleTargetRef).
If you need to change them, you need to patch the resources after they are created by the Helm Chart to change these settings.
Some of them could be good candidates for RFEs...

@whitingjr
Copy link
Author

Great advice and thank you for the pointers.
Yes these are good candidates for RFEs.

@whitingjr
Copy link
Author

@jmesnil I created #50 . Is this the RFE candidate you had in mind ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants