Skip to content

Commit

Permalink
add topology spread constraints to interceptor (kedacore#684)
Browse files Browse the repository at this point in the history
Signed-off-by: Noah Yoshida <noahcy117@gmail.com>
  • Loading branch information
noyoshi authored and wozniakjan committed Nov 28, 2024
1 parent e2d2da4 commit c53aa57
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion http-add-on/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ their default values.
| `scaler.nodeSelector` | object | `{}` | Node selector for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/)) |
| `scaler.pendingRequestsInterceptor` | int | `200` | The number of "target requests" that the external scaler will report to KEDA for the interceptor's scaling metrics. See the [KEDA external scaler documentation](https://keda.sh/docs/2.4/concepts/external-scalers/) for details on target requests. |
| `scaler.pullPolicy` | string | `"Always"` | The image pull policy for the scaler component |
| `scaler.replicas` | int | `3` | Number of replicas |
| `scaler.replicas` | int | `3` | Number of replicas |
| `scaler.resources.limits.cpu` | float | `0.5` | |
| `scaler.resources.limits.memory` | string | `"64Mi"` | |
| `scaler.resources.requests.cpu` | string | `"250m"` | |
Expand All @@ -157,6 +157,9 @@ their default values.
| `interceptor.keepAlive` | string | `"1s"` | The interceptor's connection keep alive timeout |
| `interceptor.maxIdleConns` | int | `100` | The maximum number of idle connections allowed in the interceptor's in-memory connection pool. Set to 0 to indicate no limit |
| `interceptor.nodeSelector` | object | `{}` | Node selector for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/)) |
| `interceptor.pdb.enabled` | bool | `true` | Whether to install the `PodDisruptionBudget` for the interceptor |
| `interceptor.pdb.maxUnavailable` | int | `1` | The maximum number of replicas that can be unavailable for the interceptor |
| `interceptor.pdb.minAvailable` | int | `0` | The minimum number of replicas that should be available for the interceptor |
| `interceptor.proxy.port` | int | `8080` | The port on which the interceptor's proxy service will listen for live HTTP traffic |
| `interceptor.proxy.service` | string | `"interceptor-proxy"` | The name of the Kubernetes `Service` for the interceptor's proxy service. This is the service that accepts live HTTP traffic. |
| `interceptor.pullPolicy` | string | `"Always"` | The image pull policy for the interceptor component |
Expand All @@ -175,6 +178,7 @@ their default values.
| `interceptor.tls.port` | int | `8443` | Port that the interceptor proxy TLS server should be started on |
| `interceptor.tlsHandshakeTimeout` | string | `"10s"` | The maximum amount of time the interceptor will wait for a TLS handshake. Set to zero to indicate no timeout. |
| `interceptor.tolerations` | list | `[]` | Tolerations for pod scheduling ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)) |
| `interceptor.topologySpreadConstraints` | list | `[]` | Topology spread constraints ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/)) |

Specify each parameter using the `--set key=value[,key=value]` argument to
`helm install`. For example:
Expand Down
4 changes: 4 additions & 0 deletions http-add-on/templates/interceptor/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.interceptor.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
2 changes: 2 additions & 0 deletions http-add-on/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ interceptor:
tolerations: []
# -- Affinity for pod scheduling ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/))
affinity: {}
# -- Topology spread constraints ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/))
topologySpreadConstraints: []
# interceptor pod resource limits
resources:
# -- The CPU/memory resource limit for the operator component
Expand Down

0 comments on commit c53aa57

Please sign in to comment.