diff --git a/stable/nextcloud/Chart.yaml b/stable/nextcloud/Chart.yaml index 30a0cffdb361..17323dc3f585 100644 --- a/stable/nextcloud/Chart.yaml +++ b/stable/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: nextcloud -version: 1.10.1 +version: 1.11.0 appVersion: 17.0.0 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/stable/nextcloud/README.md b/stable/nextcloud/README.md index 3a81c11e5a18..7b9fdfe64553 100644 --- a/stable/nextcloud/README.md +++ b/stable/nextcloud/README.md @@ -144,6 +144,10 @@ The following table lists the configurable parameters of the nextcloud chart and | `readinessProbe.timeoutSeconds` | When the probe times out | `5` | | `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe | `3` | | `readinessProbe.successThreshold` | Minimum consecutive successes for the probe | `1` | +| `hpa.enabled` | Boolean to create a HorizontalPodAutoscaler | `false` | +| `hpa.cputhreshold` | CPU threshold percent for the HorizontalPodAutoscale | `60` | +| `hpa.minPods` | Min. pods for the Nextcloud HorizontalPodAutoscaler | `1` | +| `hpa.maxPods` | Max. pods for the Nextcloud HorizontalPodAutoscaler | `10` | | `deploymentAnnotations` | Annotations to be added at 'deployment' level | not set | | `podAnnotations` | Annotations to be added at 'pod' level | not set | diff --git a/stable/nextcloud/templates/hpa.yaml b/stable/nextcloud/templates/hpa.yaml new file mode 100644 index 000000000000..81df1b8e09a5 --- /dev/null +++ b/stable/nextcloud/templates/hpa.yaml @@ -0,0 +1,19 @@ +{{- if .Values.hpa.enabled -}} +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ template "nextcloud.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "nextcloud.name" . }} + helm.sh/chart: {{ include "nextcloud.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + scaleTargetRef: + kind: Deployment + apiVersion: apps/v1 + name: {{ template "nextcloud.fullname" . }} + minReplicas: {{ .Values.hpa.minPods }} + maxReplicas: {{ .Values.hpa.maxPods }} + targetCPUUtilizationPercentage: {{ .Values.hpa.cputhreshold }} +{{- end }} \ No newline at end of file diff --git a/stable/nextcloud/values.yaml b/stable/nextcloud/values.yaml index 065a8b2cf13c..70a360c21b39 100644 --- a/stable/nextcloud/values.yaml +++ b/stable/nextcloud/values.yaml @@ -331,6 +331,15 @@ readinessProbe: failureThreshold: 3 successThreshold: 1 +## Enable pod autoscaling using HorizontalPodAutoscaler +## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ +## +hpa: + enabled: false + cputhreshold: 60 + minPods: 1 + maxPods: 10 + nodeSelector: {} tolerations: []