From ee9aa43c2be38372b922343b2dabece34e3e6baa Mon Sep 17 00:00:00 2001 From: M_Westerholz Date: Tue, 12 Nov 2024 14:50:08 +0000 Subject: [PATCH] preparing hpa for staging loadtest --- .../charts/phpldapadmin/templates/deployment.yaml | 4 +++- charts/dbildungs-iam-ldap/templates/{hpa.yml => hpa.yaml} | 8 ++------ charts/dbildungs-iam-ldap/values.yaml | 5 ++--- 3 files changed, 7 insertions(+), 10 deletions(-) rename charts/dbildungs-iam-ldap/templates/{hpa.yml => hpa.yaml} (81%) diff --git a/charts/dbildungs-iam-ldap/charts/phpldapadmin/templates/deployment.yaml b/charts/dbildungs-iam-ldap/charts/phpldapadmin/templates/deployment.yaml index 5db5d3d..8435416 100755 --- a/charts/dbildungs-iam-ldap/charts/phpldapadmin/templates/deployment.yaml +++ b/charts/dbildungs-iam-ldap/charts/phpldapadmin/templates/deployment.yaml @@ -10,7 +10,9 @@ metadata: heritage: {{ .Release.Service }} spec: - replicas: {{ if not .Values.autoscaling.enabled }}{{ .Values.replicaCount }}{{ end }} + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} selector: matchLabels: app: {{ template "phpldapadmin.name" . }} diff --git a/charts/dbildungs-iam-ldap/templates/hpa.yml b/charts/dbildungs-iam-ldap/templates/hpa.yaml similarity index 81% rename from charts/dbildungs-iam-ldap/templates/hpa.yml rename to charts/dbildungs-iam-ldap/templates/hpa.yaml index adbb825..265b7e9 100644 --- a/charts/dbildungs-iam-ldap/templates/hpa.yml +++ b/charts/dbildungs-iam-ldap/templates/hpa.yaml @@ -1,3 +1,4 @@ +{{- if .Values.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: @@ -22,9 +23,4 @@ spec: target: type: Utilization averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} \ No newline at end of file +{{- end }} \ No newline at end of file diff --git a/charts/dbildungs-iam-ldap/values.yaml b/charts/dbildungs-iam-ldap/values.yaml index 4cdf37b..bb5c60c 100644 --- a/charts/dbildungs-iam-ldap/values.yaml +++ b/charts/dbildungs-iam-ldap/values.yaml @@ -425,8 +425,7 @@ phpldapadmin: # hosts: # - phpldapadmin.example autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 - targetCPUUtilizationPercentage: 60 - targetMemoryUtilizationPercentage: 60 \ No newline at end of file + targetCPUUtilizationPercentage: 60 \ No newline at end of file