From 77624d60cb6fb59dc5ddeeb1b3da62b36beeef62 Mon Sep 17 00:00:00 2001 From: jessebot Date: Wed, 24 Jul 2024 13:41:38 +0200 Subject: [PATCH] add minio chart install to test s3 object store as primary storage in ci Signed-off-by: jessebot --- .github/minio_test_values.yaml | 21 +++++++++++++++++++++ .github/workflows/lint-test.yaml | 17 +++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/minio_test_values.yaml diff --git a/.github/minio_test_values.yaml b/.github/minio_test_values.yaml new file mode 100644 index 00000000..836e0e11 --- /dev/null +++ b/.github/minio_test_values.yaml @@ -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 diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index a6205de0..8e47bc94 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -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 @@ -112,6 +117,18 @@ jobs: uses: helm/kind-action@v1.10.0 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'