From b414b09a5ed4be872eabe7312aa9d9c617894c69 Mon Sep 17 00:00:00 2001 From: Artem Bielskyi Date: Mon, 16 Sep 2024 20:19:25 +0300 Subject: [PATCH] disable hpa --- charts/wp-project-skeleton/templates/hpa.yaml | 40 ------------------- .../templates/hpa.yaml_disabled | 40 +++++++++++++++++++ 2 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 charts/wp-project-skeleton/templates/hpa.yaml create mode 100644 charts/wp-project-skeleton/templates/hpa.yaml_disabled diff --git a/charts/wp-project-skeleton/templates/hpa.yaml b/charts/wp-project-skeleton/templates/hpa.yaml deleted file mode 100644 index 1501a40..0000000 --- a/charts/wp-project-skeleton/templates/hpa.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} - kind: Deployment - name: {{ include "common.names.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetMemory }} - - type: Resource - resource: - name: memory - {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} - targetAverageUtilization: {{ .Values.autoscaling.targetMemory }} - {{- else }} - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemory }} - {{- end }} - {{- end }} - {{- if .Values.autoscaling.targetCPU }} - - type: Resource - resource: - name: cpu - {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} - targetAverageUtilization: {{ .Values.autoscaling.targetCPU }} - {{- else }} - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPU }} - {{- end }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/wp-project-skeleton/templates/hpa.yaml_disabled b/charts/wp-project-skeleton/templates/hpa.yaml_disabled new file mode 100644 index 0000000..3436c5f --- /dev/null +++ b/charts/wp-project-skeleton/templates/hpa.yaml_disabled @@ -0,0 +1,40 @@ +# {{- if .Values.autoscaling.enabled }} +# apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }} +# kind: HorizontalPodAutoscaler +# metadata: +# name: {{ include "common.names.fullname" . }} +# namespace: {{ .Release.Namespace | quote }} +# labels: {{- include "common.labels.standard" . | nindent 4 }} +# spec: +# scaleTargetRef: +# apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} +# kind: Deployment +# name: {{ include "common.names.fullname" . }} +# minReplicas: {{ .Values.autoscaling.minReplicas }} +# maxReplicas: {{ .Values.autoscaling.maxReplicas }} +# metrics: +# {{- if .Values.autoscaling.targetMemory }} +# - type: Resource +# resource: +# name: memory +# {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} +# targetAverageUtilization: {{ .Values.autoscaling.targetMemory }} +# {{- else }} +# target: +# type: Utilization +# averageUtilization: {{ .Values.autoscaling.targetMemory }} +# {{- end }} +# {{- end }} +# {{- if .Values.autoscaling.targetCPU }} +# - type: Resource +# resource: +# name: cpu +# {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} +# targetAverageUtilization: {{ .Values.autoscaling.targetCPU }} +# {{- else }} +# target: +# type: Utilization +# averageUtilization: {{ .Values.autoscaling.targetCPU }} +# {{- end }} +# {{- end }} +# {{- end }} \ No newline at end of file