Skip to content

Commit

Permalink
fix(hpa): deprecated api version, bump to v2 (#9348)
Browse files Browse the repository at this point in the history
* fix(hpa): deprecated api version, bump to v2

* chore(hpa): abstract hpa apiVersion to helm value

* feat(hpa): add controller.autoscaling.apiVersion docs in README

* docs(hpa): quotes around apiVersion string type

* chore(hpa): run helm-docs in repo

* chore(hpa): remove local helm-docs module install and output

* docs(helm): add hpa controller.autoscaling.apiVersion description

* docs(hpa): remove autoscaling.apiVersion description as it fails ci
  • Loading branch information
sjoukedv authored Dec 4, 2022
1 parent 8a5eaa6 commit 27ffeeb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/ingress-nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ Kubernetes: `>=1.20.0-0`
| controller.affinity | object | `{}` | Affinity and anti-affinity rules for server scheduling to nodes # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity # |
| controller.allowSnippetAnnotations | bool | `true` | This configuration defines if Ingress Controller should allow users to set their own *-snippet annotations, otherwise this is forbidden / dropped when users add those annotations. Global snippets in ConfigMap are still respected |
| controller.annotations | object | `{}` | Annotations to be added to the controller Deployment or DaemonSet # |
| controller.autoscaling.apiVersion | string | `"autoscaling/v2"` | |
| controller.autoscaling.behavior | object | `{}` | |
| controller.autoscaling.enabled | bool | `false` | |
| controller.autoscaling.maxReplicas | int | `11` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/ingress-nginx/templates/controller-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if and .Values.controller.autoscaling.enabled (or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both")) -}}
{{- if not .Values.controller.keda.enabled }}

apiVersion: autoscaling/v2beta2
apiVersion: {{ .Values.controller.autoscaling.apiVersion }}
kind: HorizontalPodAutoscaler
metadata:
annotations:
Expand Down
1 change: 1 addition & 0 deletions charts/ingress-nginx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ controller:

# Mutually exclusive with keda autoscaling
autoscaling:
apiVersion: autoscaling/v2
enabled: false
minReplicas: 1
maxReplicas: 11
Expand Down

0 comments on commit 27ffeeb

Please sign in to comment.