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

Use unified nginx helm chart #636

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lianhao
Copy link
Collaborator

@lianhao lianhao commented Dec 11, 2024

Description

  • Add helm chart support for OPEA nginx

  • Use unified nginx chart in E2E.

Issues

Fixes #635.

Type of change

List the type of change like below. Please delete options that are not relevant.

  • New feature (non-breaking change which adds new functionality)

Dependencies

List the newly introduced 3rd party dependency if exists.

Tests

Describe the tests that you ran to verify your changes.

@lianhao lianhao requested a review from Ruoyu-y December 11, 2024 08:42
@lianhao lianhao requested a review from yongfengdu as a code owner December 11, 2024 08:42
@lianhao lianhao force-pushed the unified_nginx branch 2 times, most recently from 030fe5b to 4d71f08 Compare December 11, 2024 08:48
helm-charts/common/nginx/values.yaml Outdated Show resolved Hide resolved
helm-charts/common/nginx/values.yaml Outdated Show resolved Hide resolved
helm-charts/common/nginx/values.yaml Outdated Show resolved Hide resolved
helm-charts/common/nginx/templates/deployment.yaml Outdated Show resolved Hide resolved
helm-charts/common/nginx/README.md Outdated Show resolved Hide resolved
helm-charts/common/nginx/values.yaml Outdated Show resolved Hide resolved
helm-charts/common/nginx/values.yaml Outdated Show resolved Hide resolved
@lianhao
Copy link
Collaborator Author

lianhao commented Dec 12, 2024

The faqgen failure is due to the known issue of opea-project/GenAIComps#969

@lianhao lianhao force-pushed the unified_nginx branch 2 times, most recently from 002d680 to 6139cdb Compare December 12, 2024 02:04
@lianhao
Copy link
Collaborator Author

lianhao commented Dec 20, 2024

we need to wait until langserve 0.3.1 is available in pypi to unblock the faqgen CI failure

- Add helm chart support for OPEA nginx

- Use unified nginx chart in E2E

Signed-off-by: Lianhao Lu <[email protected]>
@lianhao
Copy link
Collaborator Author

lianhao commented Dec 20, 2024

gaudi CI environment issue:
huggingface_hub.utils._errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/whoami-v2

Comment on lines +82 to +83
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO these variable names could be a bit shorter.

Suggested change
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
targetCPUPercentage: 80
# targetMemoryPercentage: 80

Comment on lines +66 to +74
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
Copy link
Contributor

@eero-t eero-t Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never used cpu/mem metrics for scaling (only application specific custom metrics), but according to docs: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#how-does-a-horizontalpodautoscaler-work

CPU/mem resource requests need to be specified for HPA to work on relative CPU/mem targets:

For per-pod resource metrics (like CPU), the controller fetches the metrics from the resource metrics API for each Pod targeted by the HorizontalPodAutoscaler. Then, if a target utilization value is set, the controller calculates the utilization value as a percentage of the equivalent resource request on the containers in each Pod.
...
Please note that if some of the Pod's containers do not have the relevant resource request set, CPU utilization for the Pod will not be defined and the autoscaler will not take any action for that metric.

Copy link
Contributor

@eero-t eero-t Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think that:

  • requests part should be enabled, after verifying that current values match "normal" resource usage for specified nginx version
  • Comment for requests values should state that "normal" nginx resource usage should be checked and values updated accordingly, before enabling autoscaling
  • Comment for limits needs to state that they should be enabled only after checking how much nginx needs when it's stressed, and using those values + some extra for growth (increased buffers, possible leakage etc)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do this in another PR along with issue #643 ?

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

Successfully merging this pull request may close these issues.

[Feature] Use unified nginx chart
3 participants