Skip to content

Commit fb8af0e

Browse files
MAJOR: kubernetes-ingress: add ability to specify hpa name in keda object (#253)
Signed-off-by: Devin Smith <[email protected]>
1 parent 03d1ed8 commit fb8af0e

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

kubernetes-ingress/templates/controller-keda.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,16 @@ spec:
4242
{{ end }}
4343
advanced:
4444
restoreToOriginalReplicaCount: {{ .Values.controller.keda.restoreToOriginalReplicaCount }}
45-
{{- if .Values.controller.keda.behavior }}
45+
{{- if .Values.controller.keda.horizontalPodAutoscalerConfig }}
4646
horizontalPodAutoscalerConfig:
47+
{{- if .Values.controller.keda.horizontalPodAutoscalerConfig.name }}
48+
name: {{ .Values.controller.keda.horizontalPodAutoscalerConfig.name }}
49+
{{- end }}
50+
{{- if .Values.controller.keda.horizontalPodAutoscalerConfig.behavior }}
4751
behavior:
48-
{{ with .Values.controller.keda.behavior -}}
52+
{{ with .Values.controller.keda.horizontalPodAutoscalerConfig.behavior -}}
4953
{{ toYaml . | indent 8 }}
5054
{{ end }}
5155
{{- end }}
5256
{{- end }}
57+
{{- end }}

kubernetes-ingress/values.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,15 @@ controller:
257257
restoreToOriginalReplicaCount: false
258258
scaledObject:
259259
annotations: {}
260-
behavior: {}
261-
# scaleDown:
262-
# stabilizationWindowSeconds: 300
263-
# policies:
264-
# - type: Percent
265-
# value: 100
266-
# periodSeconds: 15
260+
horizontalPodAutoscalerConfig: {}
261+
# name: ""
262+
# behavior:
263+
# scaleDown:
264+
# stabilizationWindowSeconds: 300
265+
# policies:
266+
# - type: Percent
267+
# value: 100
268+
# periodSeconds: 15
267269
triggers: []
268270
# - type: prometheus
269271
# metadata:

0 commit comments

Comments
 (0)