Skip to content

Commit

Permalink
add conditional minReplicas in HPA and rm keda
Browse files Browse the repository at this point in the history
  • Loading branch information
juri committed Nov 7, 2023
1 parent cc70f7e commit be9e974
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 88 deletions.
2 changes: 1 addition & 1 deletion charts/app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: app
description: A Helm chart for Kubernetes Deployment
type: application

version: 0.12.0
version: 0.12.1

keywords:
- deployment
Expand Down
1 change: 0 additions & 1 deletion charts/app/templates/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
{{ include "base.podDisruptionBudget" . }}
{{ include "base.horizontalPodAutoscaler" . }}
{{ include "base.PriorityClass" . }}
{{ include "base.keda" . }}
{{ include "base.rbac" . }}
{{ include "base.deployment" . }}
{{ include "base.argoRollouts" . }}
Expand Down
33 changes: 0 additions & 33 deletions charts/app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,39 +191,6 @@ autoscaling:
# scaleDown:
# stabilizationWindowSeconds: 300

## enable keda
## ref: https://keda.sh/docs/2.3/concepts/scaling-deployments/
keda:
enabled: false
# envSourceContainerName: container-name # Optional. Default: .spec.template.spec.containers[0]
# pollingInterval: 30 # Optional. Default: 30 seconds
# cooldownPeriod: 300 # Optional. Default: 300 seconds
# minReplicaCount: 0 # Optional. Default: 0
# maxReplicaCount: 100 # Optional. Default: 100
# advanced: # Optional. Section to specify advanced options
# restoreToOriginalReplicaCount: true/false # Optional. Default: false
# horizontalPodAutoscalerConfig: # Optional. Section to specify HPA related options
# behavior: # Optional. Use to modify HPA's scaling behavior
# scaleDown:
# stabilizationWindowSeconds: 300
# policies:
# - type: Percent
# value: 100
# periodSeconds: 15
# triggers:
# - type: gcp-pubsub
# metadata:
# subscriptionSize: "5"
# subscriptionName: "audit-logs-subscription"
# credentialsFromEnv: "GOOGLE_APPLICATION_CREDENTIALS"
## or
# authenticationRef:
# name: .Release.Name
# secretTargetRef:
# - parameter: GoogleApplicationCredentials # - Default is GoogleApplicationCredentials
# name: pubsub-secret # Required. Refers to the name of the secret
# key: GOOGLE_APPLICATION_CREDENTIALS # Required - Default is GOOGLE_APPLICATION_CREDENTIALS

# ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
podDisruptionBudget:
enabled: false
Expand Down
2 changes: 1 addition & 1 deletion charts/base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: base
description: A Helm chart for Kubernetes with helm named templates
type: library

version: 0.12.0
version: 0.12.1

keywords:
- deployment
Expand Down
52 changes: 0 additions & 52 deletions charts/base/templates/_ keda.tpl

This file was deleted.

2 changes: 2 additions & 0 deletions charts/base/templates/_horizontalPodAutoscaler.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ spec:
kind: {{ .Values.kind | default "Deployment" }}
{{- end }}
name: {{ include "base.fullname" . }}
{{- if .Values.autoscaling.minReplicas }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
{{- end }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- range .Values.autoscaling.memory }}
Expand Down

0 comments on commit be9e974

Please sign in to comment.