From 5e117df59494e8b6caccc2947634f3de8244f572 Mon Sep 17 00:00:00 2001 From: jessebot Date: Fri, 24 Jan 2025 23:16:33 +0100 Subject: [PATCH 1/4] attempt to support pixelfed-glitch in ci tests --- .github/workflows/ci-helm-lint-test.yml | 42 +++++++++++++ .../test-values/glitch-postgresql-plain.yaml | 62 +++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 charts/pixelfed/test-values/glitch-postgresql-plain.yaml diff --git a/.github/workflows/ci-helm-lint-test.yml b/.github/workflows/ci-helm-lint-test.yml index 5db0841..fd49f04 100644 --- a/.github/workflows/ci-helm-lint-test.yml +++ b/.github/workflows/ci-helm-lint-test.yml @@ -84,3 +84,45 @@ jobs: ct install \ --target-branch ${{ github.event.repository.default_branch }} \ --helm-extra-set-args "--values ./charts/pixelfed/test-values/postgresql-plain.yaml" + + glitch_test_plain: + name: Test chart plain + runs-on: ubuntu-latest + needs: lint + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: "0" + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + + - name: Install Helm + uses: azure/setup-helm@v4 + + - name: Add dependency chart repos + run: | + helm repo add bitnami https://charts.bitnami.com/bitnami + + - name: Set glitch up chart-testing + uses: helm/chart-testing-action@v2.7.0 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + + - name: Create kind cluster + uses: helm/kind-action@v1.12.0 + if: steps.list-changed.outputs.changed == 'true' + + - name: Run glitch chart-testing (install) + id: install + if: steps.list-changed.outputs.changed == 'true' + run: | + ct install \ + --target-branch ${{ github.event.repository.default_branch }} \ + --helm-extra-set-args "--values ./charts/pixelfed/test-values/glitch_postgresql-plain.yaml" diff --git a/charts/pixelfed/test-values/glitch-postgresql-plain.yaml b/charts/pixelfed/test-values/glitch-postgresql-plain.yaml new file mode 100644 index 0000000..5c90d9c --- /dev/null +++ b/charts/pixelfed/test-values/glitch-postgresql-plain.yaml @@ -0,0 +1,62 @@ +# This file is strictly for testing a base functionality of this chart +# it uses postgresql and valkey and provides credentials for them as well as mail + +image: + registry: docker.io + repo: jessebot/pixelfed-glitch + tag: v0.12.4-glitch.1.8.0-nginx + +pixelfed: + app: + domain: "example.com" + mail: + username: test + password: testing1234567 + +# VALKEY +valkey: + auth: + enabled: true + password: testing1234567 + + primary: + replicaCount: 2 + disableCommands: + - FLUSHALL + persistence: + enabled: false + + replica: + replicaCount: 0 + persistence: + enabled: false + +# POSTGRES +postgresql: + auth: + password: testing1234567 + postgresPassword: testing1234567 + username: pixelfed + database: pixelfed + +# LIVENESS PROBE +livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 + httpGet: + path: /api/service/health-check + port: http + +# READINESS PROBE +readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 + httpGet: + path: /api/service/health-check + port: http From 6aa68933986f12db6cb1414fb0cc52dbbcd14088 Mon Sep 17 00:00:00 2001 From: jessebot Date: Fri, 24 Jan 2025 23:17:32 +0100 Subject: [PATCH 2/4] update chart version --- charts/pixelfed/Chart.yaml | 2 +- charts/pixelfed/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/pixelfed/Chart.yaml b/charts/pixelfed/Chart.yaml index 37bc5db..b50586f 100644 --- a/charts/pixelfed/Chart.yaml +++ b/charts/pixelfed/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.19.0 +version: 0.19.1 # This is the version number of the application being deployed. # renovate:image=ghcr.io/mattlqx/docker-pixelfed diff --git a/charts/pixelfed/README.md b/charts/pixelfed/README.md index 2f8325d..16934d1 100644 --- a/charts/pixelfed/README.md +++ b/charts/pixelfed/README.md @@ -1,6 +1,6 @@ # Pixelfed Helm Chart -![Version: 0.19.0](https://img.shields.io/badge/Version-0.19.0-informational?style=flat-square) ![AppVersion: v0.12.4-nginx](https://img.shields.io/badge/AppVersion-v0.12.4--nginx-informational?style=flat-square) +![Version: 0.19.1](https://img.shields.io/badge/Version-0.19.1-informational?style=flat-square) ![AppVersion: v0.12.4-nginx](https://img.shields.io/badge/AppVersion-v0.12.4--nginx-informational?style=flat-square) A Helm chart for deploying Pixelfed on Kubernetes From f2c3fbae059b5ff3c92b23e27fbc9acb9b5248d7 Mon Sep 17 00:00:00 2001 From: jessebot Date: Fri, 24 Jan 2025 23:21:23 +0100 Subject: [PATCH 3/4] fix name of test file for testing pixelfed-glitch --- .github/workflows/ci-helm-lint-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-helm-lint-test.yml b/.github/workflows/ci-helm-lint-test.yml index fd49f04..1ac2ef4 100644 --- a/.github/workflows/ci-helm-lint-test.yml +++ b/.github/workflows/ci-helm-lint-test.yml @@ -86,7 +86,7 @@ jobs: --helm-extra-set-args "--values ./charts/pixelfed/test-values/postgresql-plain.yaml" glitch_test_plain: - name: Test chart plain + name: Test chart plain + with pixelfed-glitch runs-on: ubuntu-latest needs: lint steps: @@ -125,4 +125,4 @@ jobs: run: | ct install \ --target-branch ${{ github.event.repository.default_branch }} \ - --helm-extra-set-args "--values ./charts/pixelfed/test-values/glitch_postgresql-plain.yaml" + --helm-extra-set-args "--values ./charts/pixelfed/test-values/glitch-postgresql-plain.yaml" From 4725980574fcb5860b50329c43b9e020ce462191 Mon Sep 17 00:00:00 2001 From: jessebot Date: Fri, 24 Jan 2025 23:31:35 +0100 Subject: [PATCH 4/4] fix test image repo --- charts/pixelfed/test-values/glitch-postgresql-plain.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pixelfed/test-values/glitch-postgresql-plain.yaml b/charts/pixelfed/test-values/glitch-postgresql-plain.yaml index 5c90d9c..8cf6edf 100644 --- a/charts/pixelfed/test-values/glitch-postgresql-plain.yaml +++ b/charts/pixelfed/test-values/glitch-postgresql-plain.yaml @@ -3,7 +3,7 @@ image: registry: docker.io - repo: jessebot/pixelfed-glitch + repository: jessebot/pixelfed-glitch tag: v0.12.4-glitch.1.8.0-nginx pixelfed: