-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(HPA): fix kratos HPA by using the correct autoscaling v1 cpu util…
…ization config (#346) * fix (hpa): use the correct autoscaling/v1 cpu utilization config and add support for autoscaling/v2beta2 config * use helm capabilities for selecting the hpa config depending on the available version * add autoscaling to installation values, separate hpa-v1, hpa-v2 into separate files * fix typo with enable autoscaling * fix typo with memory utilization config in autoscaling * disable autoscaling from installation values
- Loading branch information
1 parent
60bfbdf
commit 40af988
Showing
3 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
--- | ||
autoscaling: | ||
enabled: false | ||
kratos: | ||
autoMigrate: true | ||
identitySchemas: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if and (.Values.autoscaling.enabled) (not (.Capabilities.APIVersions.Has "autoscaling/v2beta2")) }} | ||
apiVersion: autoscaling/v1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "kratos.fullname" . }} | ||
labels: | ||
{{- include "kratos.labels" . | nindent 4 }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ include "kratos.fullname" . }} | ||
minReplicas: {{ .Values.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.autoscaling.maxReplicas }} | ||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters