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 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 }}