diff --git a/kubernetes/chart/README.md b/kubernetes/chart/README.md index 6e9245df..82fda744 100644 --- a/kubernetes/chart/README.md +++ b/kubernetes/chart/README.md @@ -24,12 +24,6 @@ The open source Sourcegraph alternative. Sourcebot gives you a powerful interfac | additionalLabels | object | `{}` | Add extra labels to all resources. | | affinity | object | `{}` | Set affinity rules for pod scheduling. Defaults to soft anti-affinity if not set. See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ | | args | list | `[]` | Override the default arguments of the container. | -| autoscaling | object | `{"enabled":false,"maxReplicas":3,"minReplicas":1,"targetCPUUtilizationPercentage":80,"targetMemoryUtilizationPercentage":80}` | Configure Horizontal Pod Autoscaler. | -| autoscaling.enabled | bool | `false` | Enable or disable Horizontal Pod Autoscaler. | -| autoscaling.maxReplicas | int | `3` | Maximum number of replicas. | -| autoscaling.minReplicas | int | `1` | Minimum number of replicas. | -| autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU utilization percentage for autoscaling. | -| autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory utilization percentage for autoscaling. | | command | list | `[]` | Override the default command of the container. | | config | object | `{"$schema":"https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json","connections":{},"settings":{}}` | Configure Sourcebot-specific application settings. | | containerSecurityContext | object | `{}` | Set the container-level security context. | diff --git a/kubernetes/chart/templates/hpa.yaml b/kubernetes/chart/templates/hpa.yaml deleted file mode 100644 index 8079dc75..00000000 --- a/kubernetes/chart/templates/hpa.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if $.Values.autoscaling.enabled }} ---- -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "sourcebot.fullname" $ }} - labels: - {{- include "sourcebot.labels" $ | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "sourcebot.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/kubernetes/chart/templates/pdb.yaml b/kubernetes/chart/templates/pdb.yaml index 307b98f7..1cc85f51 100644 --- a/kubernetes/chart/templates/pdb.yaml +++ b/kubernetes/chart/templates/pdb.yaml @@ -1,4 +1,4 @@ -{{- if and $.Values.podDisruptionBudget.enabled (gt (int $.Values.replicaCount) 1) }} +{{- if and $.Values.podDisruptionBudget.enabled (gt (int $.Values.replicaCount) 1) }} apiVersion: {{ include "common.capabilities.policy.apiVersion" . }} kind: PodDisruptionBudget metadata: diff --git a/kubernetes/chart/values.schema.json b/kubernetes/chart/values.schema.json index 351d2ff3..10832e63 100644 --- a/kubernetes/chart/values.schema.json +++ b/kubernetes/chart/values.schema.json @@ -336,26 +336,6 @@ "startupProbe": { "$ref": "#/definitions/probe" }, - "autoscaling": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "minReplicas": { - "type": "integer" - }, - "maxReplicas": { - "type": "integer" - }, - "targetCPUUtilizationPercentage": { - "type": "integer" - }, - "targetMemoryUtilizationPercentage": { - "type": "integer" - } - } - }, "volumes": { "type": "array", "items": { diff --git a/kubernetes/chart/values.yaml b/kubernetes/chart/values.yaml index 51bdfc96..14b9212b 100644 --- a/kubernetes/chart/values.yaml +++ b/kubernetes/chart/values.yaml @@ -198,19 +198,6 @@ startupProbe: # -- Initial delay before the first probe. periodSeconds: 30 -# -- Configure Horizontal Pod Autoscaler. -autoscaling: - # -- Enable or disable Horizontal Pod Autoscaler. - enabled: false - # -- Minimum number of replicas. - minReplicas: 1 - # -- Maximum number of replicas. - maxReplicas: 3 - # -- Target CPU utilization percentage for autoscaling. - targetCPUUtilizationPercentage: 80 - # -- Target memory utilization percentage for autoscaling. - targetMemoryUtilizationPercentage: 80 - # -- Define additional volumes. # See: https://kubernetes.io/docs/concepts/storage/volumes/ volumes: []