Skip to content

Commit

Permalink
only set spec.replicas in Nextcloud deployment if .Values.hpa.enabled…
Browse files Browse the repository at this point in the history
… is set to false (#596)

update hpa ci test to use a minimum of 2 pods

Signed-off-by: jessebot <[email protected]>
Co-authored-by: Kate <[email protected]>
  • Loading branch information
jessebot and provokateurin authored Jul 24, 2024
1 parent ffea18f commit 34fc2df
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

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

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 5.3.0
version: 5.3.1
appVersion: 29.0.4
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ The following table lists the configurable parameters of the nextcloud chart and
| `startupProbe.timeoutSeconds` | When the probe times out | `5` |
| `startupProbe.failureThreshold` | Minimum consecutive failures for the probe | `30` |
| `startupProbe.successThreshold` | Minimum consecutive successes for the probe | `1` |
| `hpa.enabled` | Boolean to create a HorizontalPodAutoscaler | `false` |
| `hpa.enabled` | Boolean to create a HorizontalPodAutoscaler. If set to `true`, ignores `replicaCount`. | `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` |
Expand Down
2 changes: 2 additions & 0 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.hpa.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
strategy:
{{- toYaml .Values.nextcloud.strategy | nindent 4 }}
selector:
Expand Down

0 comments on commit 34fc2df

Please sign in to comment.