From 1e31a5e3597c18e5ada4f653b59172f23221fe7c Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Sun, 6 Nov 2022 14:25:19 +0100 Subject: [PATCH] Remove autoscaling using HPA Signed-off-by: Marco Franssen --- charts/spire/README.md | 4 --- charts/spire/templates/hpa.yaml | 29 ------------------- charts/spire/templates/oidc-deployment.yaml | 2 -- .../spire/templates/server-statefulset.yaml | 2 -- charts/spire/values.yaml | 7 ----- 5 files changed, 44 deletions(-) delete mode 100644 charts/spire/templates/hpa.yaml diff --git a/charts/spire/README.md b/charts/spire/README.md index 484b019..44d112f 100644 --- a/charts/spire/README.md +++ b/charts/spire/README.md @@ -55,10 +55,6 @@ Kubernetes: `>=1.21.0-0` | agent.image.version | string | `""` | | | agent.nodeSelector."kubernetes.io/arch" | string | `"amd64"` | | | agent.resources | object | `{}` | | -| autoscaling.enabled | bool | `false` | | -| autoscaling.maxReplicas | int | `100` | | -| autoscaling.minReplicas | int | `1` | | -| autoscaling.targetCPUUtilizationPercentage | int | `80` | | | csiDriver.image.pullPolicy | string | `"IfNotPresent"` | | | csiDriver.image.registry | string | `"ghcr.io"` | | | csiDriver.image.repository | string | `"spiffe/spiffe-csi-driver"` | | diff --git a/charts/spire/templates/hpa.yaml b/charts/spire/templates/hpa.yaml deleted file mode 100644 index 000dc45..0000000 --- a/charts/spire/templates/hpa.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "spire.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "spire.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "spire.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/charts/spire/templates/oidc-deployment.yaml b/charts/spire/templates/oidc-deployment.yaml index 860f6d2..0c7b48f 100644 --- a/charts/spire/templates/oidc-deployment.yaml +++ b/charts/spire/templates/oidc-deployment.yaml @@ -7,9 +7,7 @@ metadata: labels: {{- include "spire.oidc.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.oidc.replicaCount }} - {{- end }} selector: matchLabels: {{- include "spire.oidc.selectorLabels" . | nindent 6 }} diff --git a/charts/spire/templates/server-statefulset.yaml b/charts/spire/templates/server-statefulset.yaml index 4d75708..5618c7d 100644 --- a/charts/spire/templates/server-statefulset.yaml +++ b/charts/spire/templates/server-statefulset.yaml @@ -6,9 +6,7 @@ metadata: labels: {{- include "spire.server.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.server.replicaCount }} - {{- end }} serviceName: {{ include "spire.fullname" . }}-server selector: matchLabels: diff --git a/charts/spire/values.yaml b/charts/spire/values.yaml index bbcc2f2..475a22b 100644 --- a/charts/spire/values.yaml +++ b/charts/spire/values.yaml @@ -234,13 +234,6 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - # spireSettings spire: