Skip to content

Commit

Permalink
fix: fix autoscaling version detection (Kong#752)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek authored Feb 16, 2023
1 parent d531d8f commit 5bbe4fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Changelog

## Unreleased
## 2.16.5

* Fix autoscaling version detection.
[#744](https://github.com/Kong/charts/pull/744)
* Don't include a clear-stale-pid initContainer when kong gateway is not
enabled in the deployment.
[#744](https://github.com/Kong/charts/pull/744)
Expand Down
2 changes: 1 addition & 1 deletion charts/kong/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ maintainers:
name: kong
sources:
- https://github.com/Kong/charts/tree/main/charts/kong
version: 2.16.4
version: 2.16.5
appVersion: "3.1"
dependencies:
- name: postgresql
Expand Down
6 changes: 3 additions & 3 deletions charts/kong/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ spec:
behavior:
{{- toYaml .Values.autoscaling.behavior | nindent 4 }}
{{- end }}
{{- if not (.Capabilities.APIVersions.Has "autoscaling/v2beta2") }}
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage | default 80 }}
{{- else }}
{{- if contains "autoscaling/v2" (include "kong.autoscalingVersion" . ) }}
metrics:
{{- toYaml .Values.autoscaling.metrics | nindent 4 }}
{{- else }}
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage | default 80 }}
{{- end }}
{{- end }}

0 comments on commit 5bbe4fc

Please sign in to comment.