From ec27e62ab15e9c1ec20a54fd0bd4a35d61280e1d Mon Sep 17 00:00:00 2001 From: Tasuku Yamashita Date: Wed, 11 Mar 2026 11:21:41 +0900 Subject: [PATCH 1/2] Add annotations support to ScaledObject template Move $keda and $triggers variable definitions before metadata to enable annotations rendering. This allows setting KEDA pause annotations (autoscaling.keda.sh/paused, paused-replicas) for runtime replica control. Co-Authored-By: Claude Opus 4.6 --- http-service/templates/scaled-object.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/http-service/templates/scaled-object.yaml b/http-service/templates/scaled-object.yaml index d2d5c90b..a5a95db5 100644 --- a/http-service/templates/scaled-object.yaml +++ b/http-service/templates/scaled-object.yaml @@ -1,4 +1,6 @@ {{- if eq .Values.autoscaling.type "keda" }} +{{- $keda := required "autoscaling.keda is required when type is keda" .Values.autoscaling.keda }} +{{- $triggers := required "autoscaling.keda.triggers is required when type is keda" $keda.triggers }} apiVersion: keda.sh/v1alpha1 kind: ScaledObject metadata: @@ -6,6 +8,10 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "http-service.labels" . | nindent 4 }} + {{- with $keda.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: scaleTargetRef: {{- if .Values.rollout.enabled }} @@ -16,8 +22,6 @@ spec: kind: Deployment {{- end }} name: {{ include "http-service.fullname" . }} - {{- $keda := required "autoscaling.keda is required when type is keda" .Values.autoscaling.keda }} - {{- $triggers := required "autoscaling.keda.triggers is required when type is keda" $keda.triggers }} minReplicaCount: {{ required "autoscaling.minReplicas is required" .Values.autoscaling.minReplicas }} maxReplicaCount: {{ required "autoscaling.maxReplicas is required" .Values.autoscaling.maxReplicas }} {{- with $keda.pollingInterval }} From 5ebf345f0f7c82afb2213be39a5de8562574a138 Mon Sep 17 00:00:00 2001 From: Tasuku Yamashita Date: Wed, 11 Mar 2026 15:31:57 +0900 Subject: [PATCH 2/2] Bump http-service chart version to 0.2.0 Co-Authored-By: Claude Opus 4.6 --- http-service/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-service/Chart.yaml b/http-service/Chart.yaml index f666aef8..8699f778 100644 --- a/http-service/Chart.yaml +++ b/http-service/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 name: http-service description: An opinionated Helm chart for language-agnostic HTTP services with sensible defaults type: application -version: 0.1.0 +version: 0.2.0