-
Notifications
You must be signed in to change notification settings - Fork 347
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
HorizontalPodAutoscaler for envoy proxy #703
Comments
HPA is currently not supported by Envoy Gateway. It's a feature that would be beneficial to the project, so I've added it to the backlog. Let me know if you're interested in working on this and I can assign it to you.
Envoy Gateway currently creates an ELB when running in AWS. #648 intends to design an API for providing configurability to the Envoy service, PTAL, and comment as needed. |
|
Only the Envoy proxy deployment needs to be scaled. The design docs are the best place for this type of info, specifically the system design and config API design docs.
You can update this field but EG will revert it back to the desired state. This field should be configurable using the EnvoyProxy config API. If you would like to make this field configurable, please create an issue that describes your use case and xref this issue. |
cc @qicz in case you're interested in adding this to |
I am sorry for the late reply. I think we just need to provide the same docs about HPA. current envoy deployment we can configure more fields and #1398 support affinity etc settings. gateway/api/config/v1alpha1/shared_types.go Lines 45 to 119 in 4e43170
|
example ---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: envoy-demo
app.kubernetes.io/name: envoy-demo
app.kubernetes.io/part-of: envoy-demo-ns
name: envoy-demo
namespace: envoy-demo-ns
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/component: envoy-demo
app.kubernetes.io/name: envoy-demo
app.kubernetes.io/part-of: envoy-demo-ns
template:
metadata:
labels:
app.kubernetes.io/component: envoy-demo
app.kubernetes.io/name: envoy-demo
app.kubernetes.io/part-of: envoy-demo-ns
spec:
serviceAccountName: envoy-demo-sa
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: In
values:
- ""
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/component: envoy-demo
app.kubernetes.io/name: envoy-demo
app.kubernetes.io/part-of: envoy-demo-ns
namespaces:
- envoy-demo-ns
topologyKey: kubernetes.io/hostname
weight: 100
containers:
- name: envoy-demo
image: envoy-demo:latest
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: 10m
memory: 64Mi
limits:
cpu: 1
memory: 1024Mi
tolerations:
- effect: "NoSchedule"
key: "node-role.kubernetes.io/master"
operator: "Exists"
---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: test-hpa
namespace: envoy-demo-ns
spec:
maxReplicas: 3
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: envoy-demo
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80 |
thanks for outlining this @qicz, looks like we just need to outline this using docs, and no API changes are needed |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
@qicz are you planning on working on this one for v0.6.0-rc1 ? |
is there any update on this matter? I could help to work on this. However, I need some advice on how we should support HPA for Envoy Proxy deployment. Just for a context, I've applied a patch to Envoy Gateway at my organization to make it compatible with HPA when enabled externally. This patch allows EG to determine when the |
hey @ardikabs assigned this issue to you for now, thanks for volunteering ! the question I have is - should EG create the HPA resource or should the end user create one and link it to the generated Envoyproxy deployment |
IMO, it would be better if EG also managed the HPA config with introduce another field such as |
ptal @envoyproxy/gateway-maintainers, please share your thoughts on adding |
keep eye on kubernetes-sigs/gateway-api#1355 |
That part that confuses me is that I see it is possible to control the envoy deployment using the gateway/charts/gateway-helm/values.tmpl.yaml Lines 26 to 34 in dcc0ee0
Deployment object separately; https://github.com/envoyproxy/gateway/blob/main/charts/gateway-helm/templates/envoy-gateway-deployment.yaml
This makes me think, we can introduce opt-in autoscaling configuration similar to: https://github.com/kubernetes/ingress-nginx/blob/7f723c59855e82614582ff7b2efd1783b1afc2ee/charts/ingress-nginx/values.yaml#L367-L373 |
re envoyproxy#703 Signed-off-by: Gazal Gafoor <gazal.gafoor@rea-group.com>
re envoyproxy#703 Signed-off-by: Gazal Gafoor <gazal.gafoor@rea-group.com>
re envoyproxy#703 Signed-off-by: Gazal Gafoor <gazal.gafoor@rea-group.com>
hi @gazal-k, seems you have a little misunderstanding here. the deployment in helm chart is what we used to start envoy-gateway controller, the
the values in this yaml is used by the controller: gateway/charts/gateway-helm/values.tmpl.yaml Lines 27 to 29 in dcc0ee0
but https://github.com/kubernetes/ingress-nginx/blob/7f723c59855e82614582ff7b2efd1783b1afc2ee/charts/ingress-nginx/values.yaml#L367-L373 seems a good example to define |
Thanks for that. So, the |
correct |
hey @ardikabs are you planning on working on this one ? |
Yes @arkodg, I am still working on it |
closed in favor of #2257 |
Description:
Does envoy gateway have any design to scale out envoy proxy pods? Are there any best practices on how to handle increased number of requests? I'm mostly looking at deploying this to clouds like AWS/GCP/Azure which will allocate application/network Load Balancers but then how can I make sure that envoy proxy pod is not the bottleneck in the gateway and can scale out when needed.
The text was updated successfully, but these errors were encountered: