Skip to content

Commit 602e2af

Browse files
authored
Optionally create HorizontalPodAutoscaler (#8452)
Signed-off-by: Paul Abel <128620221+pdabelf5@users.noreply.github.com>
1 parent 2814d1c commit 602e2af

File tree

9 files changed

+993
-1
lines changed

9 files changed

+993
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.controller.autoscaling.enabled (eq .Values.controller.kind "deployment") (.Capabilities.APIVersions.Has "autoscaling/v2") -}}
1+
{{- if and .Values.controller.autoscaling.enabled .Values.controller.autoscaling.create (eq .Values.controller.kind "deployment") (.Capabilities.APIVersions.Has "autoscaling/v2") -}}
22
apiVersion: autoscaling/v2
33
kind: HorizontalPodAutoscaler
44
metadata:

charts/nginx-ingress/values.schema.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,7 @@
20932093
"terminationGracePeriodSeconds": 30,
20942094
"autoscaling": {
20952095
"enabled": false,
2096+
"create": true,
20962097
"annotations": {},
20972098
"minReplicas": 1,
20982099
"maxReplicas": 3,
@@ -2733,6 +2734,7 @@
27332734
"terminationGracePeriodSeconds": 30,
27342735
"autoscaling": {
27352736
"enabled": false,
2737+
"create": true,
27362738
"annotations": {},
27372739
"minReplicas": 1,
27382740
"maxReplicas": 3,

charts/nginx-ingress/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ controller:
243243
autoscaling:
244244
## Enables HorizontalPodAutoscaling.
245245
enabled: false
246+
## Create the HorizontalPodAutoscaler resource. This can be set to false to manage the HPA externally.
247+
create: true
246248
## The annotations of the Ingress Controller HorizontalPodAutoscaler.
247249
annotations: {}
248250
## Minimum number of replicas for the HPA.

0 commit comments

Comments
 (0)