Skip to content

Commit

Permalink
Add a pdb template for the http-add-on interceptor (#662)
Browse files Browse the repository at this point in the history
There is no pod disruption budget on the http addon interceptors, which
means that during node rollover, there might not be any interceptors
available to add requests to its queue. Since the queues themselves are
in memory, that means that there would be dropped requests.

Closes #658

Signed-off-by: Aaron Batilo <[email protected]>
  • Loading branch information
abatilo authored Sep 2, 2024
1 parent ee13a9c commit 2d8e903
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
21 changes: 21 additions & 0 deletions http-add-on/templates/interceptor/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.interceptor.pdb.enabled -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
labels:
app.kubernetes.io/component: interceptor
{{- include "keda-http-add-on.labels" . | indent 4 }}
name: {{ .Chart.Name }}-interceptor
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app.kubernetes.io/component: interceptor
{{- include "keda-http-add-on.matchLabels" . | indent 6 }}
{{- if .Values.interceptor.pdb.minAvailable }}
minAvailable: {{ .Values.interceptor.pdb.minAvailable }}
{{- end }}
{{- if .Values.interceptor.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.interceptor.pdb.maxUnavailable }}
{{- end }}
{{- end -}}
11 changes: 10 additions & 1 deletion http-add-on/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ operator:
memory: 20Mi

scaler:
# -- Number of replicas
# -- Number of replicas
replicas: 3
# -- The image pull secrets for the scaler component
imagePullSecrets: []
Expand Down Expand Up @@ -193,6 +193,15 @@ interceptor:
# -- Port that the interceptor proxy TLS server should be started on
port: 8443

# configuration of pdb for the interceptor
pdb:
# -- Whether to install the `PodDisruptionBudget` for the interceptor
enabled: true
# -- The minimum number of replicas that should be available for the interceptor
minAvailable: 0
# -- The maximum number of replicas that can be unavailable for the interceptor
maxUnavailable: 1

# configuration for the images to use for each component
images:
# tag is the image tag to use for all images.
Expand Down

0 comments on commit 2d8e903

Please sign in to comment.