-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(nextcloud): switch to helm-docs
Signed-off-by: WrenIX <[email protected]>
- Loading branch information
Showing
11 changed files
with
376 additions
and
1,061 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: create-nextcloud-file | ||
namespace: nextcloud | ||
spec: | ||
template: | ||
metadata: | ||
name: create-nextcloud-file | ||
spec: | ||
containers: | ||
- name: create-nextcloud-file | ||
image: curlimages/curl | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
echo "testing123" > test_upload.txt && \ | ||
curl \ | ||
-w "%{http_code}" \ | ||
-u admin:changeme \ | ||
-T test_upload.txt \ | ||
"http://nextcloud.nextcloud.svc.cluster.local:8080/remote.php/dav/files/admin/test_upload.txt" && \ | ||
echo -e "\nTried to uploaded a file, test_upload.txt, to Nextcloud." | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,6 @@ jobs: | |
- name: Add dependency chart repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo add collabora-online https://collaboraonline.github.io/online | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
@@ -58,7 +57,7 @@ jobs: | |
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
test: | ||
runs-on: ubuntu-24.04 | ||
runs-on: ubuntu-22.04 | ||
needs: [changes, lint] | ||
# only run this job if there are helm chart file changes | ||
if: needs.changes.outputs.src != 'false' | ||
|
@@ -73,27 +72,21 @@ jobs: | |
|
||
# test the helm chart with postgresql subchart enabled | ||
- name: PostgreSQL Enabled | ||
helm_args: '--helm-extra-set-args "--values charts/nextcloud/test-values/postgresql.yaml"' | ||
helm_args: '--helm-extra-set-args "--set=postgresql.enabled=true --set=postgresql.global.postgresql.auth.password=testing123456 --set=internalDatabase.enabled=false --set=externalDatabase.enabled=True --set=externalDatabase.type=postgresql --set=externalDatabase.password=testing12345"' | ||
|
||
# test the helm chart with nginx container enabled | ||
- name: Nginx Enabled | ||
helm_args: '--helm-extra-set-args "--values charts/nextcloud/test-values/nginx.yaml"' | ||
helm_args: '--helm-extra-set-args "--set=image.flavor=fpm --set=nginx.enabled=true"' | ||
|
||
# test the helm chart with horizontal pod autoscaling enabled | ||
- name: Horizontal Pod Autoscaling Enabled | ||
helm_args: '--helm-extra-set-args "--values charts/nextcloud/test-values/hpa.yaml"' | ||
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: | | ||
--namespace nextcloud --skip-clean-up --helm-extra-set-args "--values charts/nextcloud/test-values/s3-as-primary-storage.yaml" | ||
test: true | ||
|
||
# test the helm chart with imaginary | ||
- name: Imaginary Enabled | ||
helm_args: --namespace nextcloud --skip-clean-up --helm-extra-set-args "--create-namespace --values charts/nextcloud/test-values/imaginary.yaml" | ||
test: true | ||
--namespace nextcloud --skip-clean-up --helm-extra-set-args "--set=fullnameOverride=nextcloud --set=nextcloud.objectStore.s3.enabled=true --set=nextcloud.objectStore.s3.accessKey=nextcloud --set=nextcloud.objectStore.s3.secretKey=rootpass123 --set=nextcloud.objectStore.s3.host=minio.nextcloud.svc.cluster.local --set=nextcloud.objectStore.s3.port=9000 --set=nextcloud.objectStore.s3.ssl=false --set=nextcloud.objectStore.s3.bucket=nextcloud --set=nextcloud.objectStore.s3.usePathStyle=true --set=image.flavor=fpm --set=nginx.enabled=true --set=nextcloud.host=nextcloud --set=nextcloud.trustedDomains[0]='*'" | ||
steps: | ||
- name: Checkout | ||
|
@@ -109,7 +102,6 @@ jobs: | |
- name: Add dependency chart repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo add collabora-online https://collaboraonline.github.io/online | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
@@ -123,7 +115,7 @@ jobs: | |
fi | ||
- name: Create kind cluster | ||
uses: helm/kind-action@v1.11.0 | ||
uses: helm/kind-action@v1.10.0 | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Install MinIO for testing S3 as Primary Storage | ||
|
@@ -146,20 +138,18 @@ jobs: | |
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct install --target-branch ${{ github.event.repository.default_branch }} ${{ matrix.test_cases.helm_args }} | ||
|
||
- name: Run test for Nextcloud | ||
if: matrix.test_cases.test | ||
- name: Try adding a file to Nextcloud | ||
if: matrix.test_cases.name == 'S3 Enabled as Primary Storage' | ||
# applies a kubernetes job that uploads a file and then checks log of finished pod | ||
run: | | ||
EXIT=0 | ||
kubectl config set-context --current --namespace=nextcloud && \ | ||
kubectl apply -f ./.github/tests/test_job.yaml --wait=true && \ | ||
kubectl apply -f ./.github/tests/test_upload_job.yaml --wait=true && \ | ||
sleep 2 && \ | ||
kubectl wait --for=condition=Complete --timeout=2m job/test-nextcloud || EXIT=1 | ||
echo "Here's the logs from the job:" | ||
kubectl logs --ignore-errors --prefix --tail=-1 --all-containers=true -l batch.kubernetes.io/job-name=test-nextcloud | ||
echo "Here's the logs from the nextcloud pod:" | ||
kubectl logs --ignore-errors --prefix -l app.kubernetes.io/name=nextcloud | ||
exit $EXIT | ||
kubectl wait --for=condition=Complete --timeout=2m job/create-nextcloud-file && \ | ||
echo "Here's the logs from the job:" && \ | ||
kubectl logs --tail=-1 -f -l batch.kubernetes.io/job-name=create-nextcloud-file && \ | ||
echo "Here's the logs from the nextcloud pod:" && \ | ||
kubectl logs -l app.kubernetes.io/name=nextcloud | ||
summary: | ||
runs-on: ubuntu-latest-low | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,6 @@ jobs: | |
- name: Add dependency chart repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo add collabora https://collaboraonline.github.io/online/ | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
apiVersion: v2 | ||
name: nextcloud | ||
version: 6.5.0 | ||
appVersion: 30.0.4 | ||
description: A file sharing server that puts the control and security of your own data back into your hands. | ||
keywords: | ||
- nextcloud | ||
- storage | ||
- http | ||
- web | ||
- php | ||
home: https://nextcloud.com/ | ||
icon: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg | ||
sources: | ||
|
@@ -21,6 +13,19 @@ maintainers: | |
email: [email protected] | ||
- name: billimek | ||
email: [email protected] | ||
- name: WrenIX | ||
url: https://wrenix.eu | ||
- name: jessebot | ||
url: https://jessebot.work | ||
keywords: | ||
- nextcloud | ||
- storage | ||
- http | ||
- web | ||
- php | ||
version: 6.0.2 | ||
# renovate: image=docker.io/library/nextcloud | ||
appVersion: 30.0.0 | ||
dependencies: | ||
- name: postgresql | ||
version: 15.5.0 | ||
|
@@ -31,11 +36,6 @@ dependencies: | |
repository: oci://registry-1.docker.io/bitnamicharts | ||
condition: mariadb.enabled | ||
- name: redis | ||
version: 19.6.4 | ||
version: 19.5.0 | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
condition: redis.enabled | ||
- name: collabora-online | ||
version: 1.1.20 | ||
repository: https://collaboraonline.github.io/online | ||
condition: collabora.enabled | ||
alias: collabora |
Oops, something went wrong.