Skip to content

Commit

Permalink
add minio chart install to test s3 object store as primary storage in ci
Browse files Browse the repository at this point in the history
Signed-off-by: jessebot <[email protected]>
  • Loading branch information
jessebot committed Jul 24, 2024
1 parent 2421562 commit 77624d6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/minio_test_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
enabled: false

rootUser: nextcloud
rootPassword: rootpass123

## List of buckets to be created after minio install
##
buckets:
- name: nextcloud
# Policy to be set on the bucket [none|download|upload|public]
policy: none
# Purge if bucket exists already
purge: false
# set versioning for bucket [true|false]
versioning: true
# set objectlocking for bucket [true|false]
objectlocking: false
17 changes: 17 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ jobs:
- name: Horizontal Pod Autoscaling Enabled
helm_args: '--helm-extra-set-args "--set=hpa.enabled=true --set=hpa.minPods=2 --set=hpa.maxPods=3 --set=hpa.targetCPUUtilizationPercentage=75"'

# test the helm chart with s3 as the primary storage
- name: S3 Enabled as Primary Storage
# we need to skip the clean up so we can test adding a file
helm_args: '--skip-clean-up --helm-extra-set-args "--set=nextcloud.objectStore.s3.enabled=true --set-nextcloud.objectStore.s3.accessKey=nextcloud --set-nextcloud.objectStore.s3.secretKey=rootpass123 --set-nextcloud.objectStore.s3.host=minio.minio.cluster.local.svc --set-nextcloud.objectStore.s3.port=9000 --set-nextcloud.objectStore.s3.bucket=nextcloud" && echo "Success 🎉"'

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -112,6 +117,18 @@ jobs:
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'

- name: Install MinIO for testing S3 as Primary Storage
id: install
if: matrix.test_cases.name == 'S3 Enabled as Primary Storage'
# installs minio community helm chart here: https://github.com/minio/minio/tree/master/helm/minio
run: |
helm repo add minio https://charts.min.io/
helm install minio \
--namespace minio \
--create-namespace \
--values .github/minio_test_values.yaml \
minio/minio
- name: Run chart-testing (install ${{ matrix.test_cases.name }})
id: install
if: steps.list-changed.outputs.changed == 'true'
Expand Down

0 comments on commit 77624d6

Please sign in to comment.