-
Notifications
You must be signed in to change notification settings - Fork 124
Hpa #3492
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
base: main
Are you sure you want to change the base?
Hpa #3492
Conversation
add: resources for nginx
Hi @nowjean! Welcome to the project! 🎉 Thanks for opening this pull request! |
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
I have hereby read the F5 CLA and agree to its terms |
Thank you for you contribution to the project. Please run |
autoscaling: | ||
enabled: false | ||
annotations: {} | ||
minReplicas: 1 | ||
maxReplicas: 11 | ||
targetCPUUtilizationPercentage: 50 | ||
targetMemoryUtilizationPercentage: 50 | ||
behavior: {} | ||
# scaleDown: | ||
# stabilizationWindowSeconds: 300 | ||
# policies: | ||
# - type: Pods | ||
# value: 1 | ||
# periodSeconds: 180 | ||
# scaleUp: | ||
# stabilizationWindowSeconds: 300 | ||
# policies: | ||
# - type: Pods | ||
# value: 2 | ||
# periodSeconds: 60 | ||
autoscalingTemplate: [] | ||
# Custom or additional autoscaling metrics | ||
# ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-custom-metrics | ||
# - type: Pods | ||
# pods: | ||
# metric: | ||
# name: nginx_gateway_fabric_nginx_process_requests_total | ||
# target: | ||
# type: AverageValue | ||
# averageValue: 10000m | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add one-line descriptions for these fields, similar to how it's done for the others, to improve readability for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added comments!
I’ve completed 'make generate-all'. Could you please review my PR? |
172c009
to
d081d68
Compare
So this only affects the control plane, correct? We probably want to support this for the nginx data plane as well (seems like that would be the more beneficial use case). In order to configure deployment options for the data plane, it requires a bit more work, specifically in our APIs and the code itself. The NginxProxy CRD holds the deployment configuration for the nginx data plane, which the control plane uses to configure the data plane when deploying it. Here is a simple example of how we add a new field to the API to allow for configuring these types of deployment fields: #3319. |
I'd also love a more descriptive PR title, as well as a release note in the description so we can include this feature in our release notes :) |
@sjberman Yes, this PR only affects the control plane. Can we also implement HPA for the data plane? AFAIK, the data plane Deployment is created by the NginxProxy CRD, and its name depends on the Gateway's HPA only applies to Deployments with a fixed name, like:
So, I think we can't implement HPA via the Helm chart, especially since data plane and control plane pods are now separated in 2.0. |
@nowjean I updated my comment with a description on how it can be implemented on the data plane side. Glad we're on the same page :) |
Will manual test this PR for both control plane and data plane when we have all the changes :) |
Proposed changes
Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
following format:
Problem: I want NGF to work with a HorizontalPodAutoscaler
Solution: Add HPA for deployement
Testing: Describe any testing that you did.
I've deployed my AKS cluster and checked hpa working correctly.
Closes #3447
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.