diff --git a/postgresql/templates/deployment.yaml b/postgresql/templates/deployment.yaml index 35a7513..70bf78e 100644 --- a/postgresql/templates/deployment.yaml +++ b/postgresql/templates/deployment.yaml @@ -5,9 +5,7 @@ metadata: labels: {{- include "postgresql.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} - {{- end }} selector: matchLabels: {{- include "postgresql.selectorLabels" . | nindent 6 }} diff --git a/postgresql/templates/hpa.yaml b/postgresql/templates/hpa.yaml deleted file mode 100644 index 55ddcbb..0000000 --- a/postgresql/templates/hpa.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "postgresql.fullname" . }} - labels: - {{- include "postgresql.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "postgresql.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/postgresql/values_template.yaml b/postgresql/values_template.yaml index 908f143..85506e2 100644 --- a/postgresql/values_template.yaml +++ b/postgresql/values_template.yaml @@ -148,15 +148,6 @@ readinessProbe: periodSeconds: 2 timeoutSeconds: 1 -# This section is for setting up autoscaling more information can be found here: -# https://kubernetes.io/docs/concepts/workloads/autoscaling/ -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - nodeSelector: {} tolerations: []