-
Notifications
You must be signed in to change notification settings - Fork 32
feat(keda): enabling worloads scaling with KEDA (TLP-2389) #108
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| {{- if .Values.pdb.enabled }} | ||
| apiVersion: policy/v1 | ||
| kind: PodDisruptionBudget | ||
| metadata: | ||
| name: {{ include "app.fullname" . }} | ||
| namespace: {{ .Values.namespace | default .Release.Namespace }} | ||
| labels: | ||
| {{- include "app.labels" . | nindent 4 }} | ||
| spec: | ||
| {{- if .Values.pdb.maxUnavailable }} | ||
| maxUnavailable: {{ .Values.pdb.maxUnavailable }} | ||
| {{- else }} | ||
| minAvailable: {{ .Values.pdb.minAvailable | default 1 }} | ||
| {{- end }} | ||
| selector: | ||
| matchLabels: | ||
| {{- include "app.selectorLabels" . | nindent 6 }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| {{- if .Values.keda.enabled }} | ||
| apiVersion: keda.sh/v1alpha1 | ||
| kind: ScaledObject | ||
| metadata: | ||
| name: {{ include "app.fullname" . }} | ||
| namespace: {{ .Values.namespace | default .Release.Namespace }} | ||
| labels: | ||
| {{- include "app.labels" . | nindent 4 }} | ||
| spec: | ||
| scaleTargetRef: | ||
| name: {{ include "app.fullname" . }} | ||
| minReplicaCount: {{ .Values.keda.minReplicaCount }} | ||
| maxReplicaCount: {{ .Values.keda.maxReplicaCount }} | ||
| pollingInterval: {{ .Values.keda.pollingInterval }} | ||
| cooldownPeriod: {{ .Values.keda.cooldownPeriod }} | ||
| triggers: | ||
| {{- toYaml .Values.keda.triggers | nindent 4 }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Production-specific value overrides. | ||
|
|
||
| pdb: | ||
| enabled: true | ||
| minAvailable: 1 | ||
|
|
||
| keda: | ||
| enabled: true | ||
| # LLM hub proxy — CPU under-reads long inference calls | ||
| minReplicaCount: 2 | ||
| maxReplicaCount: 10 | ||
| pollingInterval: 15 | ||
| cooldownPeriod: 600 | ||
| triggers: | ||
| - type: cpu | ||
| metricType: Utilization | ||
| metadata: | ||
| value: "70" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Staging-specific value overrides. | ||
|
|
||
| keda: | ||
| enabled: true | ||
| # LLM hub proxy — CPU under-reads long inference calls | ||
| minReplicaCount: 1 | ||
| maxReplicaCount: 4 | ||
| pollingInterval: 30 | ||
| cooldownPeriod: 300 | ||
| triggers: | ||
| - type: cpu | ||
| metricType: Utilization | ||
| metadata: | ||
| value: "70" | ||
|
Comment on lines
+5
to
+14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '== files ==\n'
git ls-files helm | sed -n '1,120p'
printf '\n== ast outline values-staging.yaml ==\n'
ast-grep outline helm/values-staging.yaml --view expanded || true
printf '\n== ast outline values-production.yaml ==\n'
ast-grep outline helm/values-production.yaml --view expanded || true
printf '\n== relevant autoscaling references ==\n'
rg -n "minReplicaCount|maxReplicaCount|pollingInterval|cooldownPeriod|triggers|type: cpu|metricType: Utilization|ScaledObject|autoscal" helm -SRepository: traceloop/hub Length of output: 2045 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '== helm/values.yaml relevant section ==\n'
sed -n '60,110p' helm/values.yaml | cat -n
printf '\n== helm/templates/scaling-object.yaml ==\n'
sed -n '1,80p' helm/templates/scaling-object.yaml | cat -n
printf '\n== staging values ==\n'
sed -n '1,40p' helm/values-staging.yaml | cat -n
printf '\n== production values ==\n'
sed -n '1,50p' helm/values-production.yaml | cat -nRepository: traceloop/hub Length of output: 3377 Use a demand-based KEDA trigger instead of CPU-only scaling. Both 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Preserve explicit zero values in PDB configuration.
Helm treats numeric
0as false/empty here, somaxUnavailable: 0falls through tominAvailable, whileminAvailable: 0is replaced by thedefault 1. Both are valid Kubernetes settings and have different disruption semantics. Use key-presence/null checks instead of truthiness anddefaultfor these fields. (kubernetes.io)🤖 Prompt for AI Agents