Skip to content

Commit dd862d9

Browse files
committed
Ensure correct deployment type is watched for HPA
1 parent 6e528c3 commit dd862d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

charts/nginx-ingress/templates/controller-hpa.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ metadata:
1313
spec:
1414
scaleTargetRef:
1515
apiVersion: apps/v1
16+
{{- if eq .Values.controller.kind "deployment" }}
1617
kind: Deployment
18+
{{- else if eq .Values.controller.kind "statefulset" }}
19+
kind: StatefulSet
20+
{{- end }}
1721
name: {{ include "nginx-ingress.controller.fullname" . }}
1822
minReplicas: {{ .Values.controller.autoscaling.minReplicas }}
1923
maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }}

0 commit comments

Comments
 (0)