Skip to content

Commit 34fc2df

Browse files
only set spec.replicas in Nextcloud deployment if .Values.hpa.enabled is set to false (#596)
update hpa ci test to use a minimum of 2 pods Signed-off-by: jessebot <jessebot@linux.com> Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
1 parent ffea18f commit 34fc2df

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/lint-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080

8181
# test the helm chart with horizontal pod autoscaling enabled
8282
- name: Horizontal Pod Autoscaling Enabled
83-
helm_args: '--helm-extra-set-args "--set=hpa.enabled=true --set=hpa.minPods=1 --set=hpa.maxPods=3 --set=hpa.targetCPUUtilizationPercentage=75"'
83+
helm_args: '--helm-extra-set-args "--set=hpa.enabled=true --set=hpa.minPods=2 --set=hpa.maxPods=3 --set=hpa.targetCPUUtilizationPercentage=75"'
8484

8585
steps:
8686
- name: Checkout

charts/nextcloud/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: nextcloud
3-
version: 5.3.0
3+
version: 5.3.1
44
appVersion: 29.0.4
55
description: A file sharing server that puts the control and security of your own data back into your hands.
66
keywords:

charts/nextcloud/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ The following table lists the configurable parameters of the nextcloud chart and
203203
| `startupProbe.timeoutSeconds` | When the probe times out | `5` |
204204
| `startupProbe.failureThreshold` | Minimum consecutive failures for the probe | `30` |
205205
| `startupProbe.successThreshold` | Minimum consecutive successes for the probe | `1` |
206-
| `hpa.enabled` | Boolean to create a HorizontalPodAutoscaler | `false` |
206+
| `hpa.enabled` | Boolean to create a HorizontalPodAutoscaler. If set to `true`, ignores `replicaCount`. | `false` |
207207
| `hpa.cputhreshold` | CPU threshold percent for the HorizontalPodAutoscale | `60` |
208208
| `hpa.minPods` | Min. pods for the Nextcloud HorizontalPodAutoscaler | `1` |
209209
| `hpa.maxPods` | Max. pods for the Nextcloud HorizontalPodAutoscaler | `10` |

charts/nextcloud/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ metadata:
1717
{{- toYaml . | nindent 4 }}
1818
{{- end }}
1919
spec:
20+
{{- if not .Values.hpa.enabled }}
2021
replicas: {{ .Values.replicaCount }}
22+
{{- end }}
2123
strategy:
2224
{{- toYaml .Values.nextcloud.strategy | nindent 4 }}
2325
selector:

0 commit comments

Comments
 (0)