From 1537b87a3dfc2c0570e67a6ce49e3cea4b634ecb Mon Sep 17 00:00:00 2001 From: Ween Jiann <16207788+lwj5@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:37:56 +0800 Subject: [PATCH] Default persistence for storage to false in chart (#376) * Default storage persistence to false * Bump chart version * Updated README.md --- .github/workflows/build-image-v4.yml | 67 ++++++++++++++++++++++++++++ charts/invoiceninja/Chart.yaml | 2 +- charts/invoiceninja/README.md | 34 +++++++------- charts/invoiceninja/values.yaml | 3 +- 4 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/build-image-v4.yml diff --git a/.github/workflows/build-image-v4.yml b/.github/workflows/build-image-v4.yml new file mode 100644 index 0000000..72b8ee7 --- /dev/null +++ b/.github/workflows/build-image-v4.yml @@ -0,0 +1,67 @@ +name: Build Container Image + +# When its time to do a release do a full cross platform build for all supported +# architectures and push all of them to Docker Hub. +# Only trigger on semver shaped tags. +# Ref: https://github.com/metcalfc/docker-action-examples/blob/main/.github/workflows/release.yml +on: + push: + paths: + - "alpine/4/**" + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Prepare + id: prep + run: | + DOCKER_IMAGE=invoiceninja/invoiceninja + VERSION=edge + if [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION=${GITHUB_REF#refs/tags/} + fi + TAGS="${DOCKER_IMAGE}:${VERSION}" + MAJOR="$(echo "${VERSION}" | cut -d. -f1)" + MINOR="$(echo "${VERSION}" | cut -d. -f2)" + TAGS="$TAGS,${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:${MAJOR}.${MINOR}" + if [[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then + TAGS="$TAGS,${DOCKER_IMAGE}:latest" + fi + echo ::set-output name=tags::${TAGS} + echo ::set-output name=version::${VERSION} + echo ::set-output name=major::${MAJOR} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ hashFiles('alpine/**') }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Build + id: docker_build + uses: docker/build-push-action@v2 + with: + builder: ${{ steps.buildx.outputs.name }} + context: ./alpine/${{ steps.prep.outputs.major }}/ + build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }} + target: prod + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.prep.outputs.tags }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/charts/invoiceninja/Chart.yaml b/charts/invoiceninja/Chart.yaml index ef4b778..60120a8 100644 --- a/charts/invoiceninja/Chart.yaml +++ b/charts/invoiceninja/Chart.yaml @@ -13,7 +13,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.7.2 +version: 0.7.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. diff --git a/charts/invoiceninja/README.md b/charts/invoiceninja/README.md index f0d981c..cc95456 100644 --- a/charts/invoiceninja/README.md +++ b/charts/invoiceninja/README.md @@ -160,20 +160,22 @@ The following table shows the configuration options for the Invoice Ninja helm c ### Persistence parameters -| Parameter | Description | Default | -| ----------------------------------- | ---------------------------------------- | ----------------- | -| `persistence.public.enabled` | Enable persistence using PVC | `true` | -| `persistence.public.existingClaim` | Enable persistence using an existing PVC | `nil` | -| `persistence.public.storageClass` | PVC Storage Class | `nil` | -| `persistence.public.accessModes` | PVC Access Modes | `[ReadWriteMany]` | -| `persistence.public.size` | PVC Storage Request | `1Gi` | -| `persistence.public.dataSource` | PVC data source | `{}` | -| `persistence.storage.enabled` | Enable persistence using PVC | `true` | -| `persistence.storage.existingClaim` | Enable persistence using an existing PVC | `nil` | -| `persistence.storage.storageClass` | PVC Storage Class | `nil` | -| `persistence.storage.accessModes` | PVC Access Modes | `[ReadWriteMany]` | -| `persistence.storage.size` | PVC Storage Request | `5Gi` | -| `persistence.storage.dataSource` | PVC data source | `{}` | +| Parameter | Description | Default | +| ----------------------------------- | --------------------------------------------------- | ----------------- | +| `persistence.public.enabled` | Enable persistence using PVC | `true` | +| `persistence.public.existingClaim` | Enable persistence using an existing PVC | `nil` | +| `persistence.public.storageClass` | PVC Storage Class | `nil` | +| `persistence.public.accessModes` | PVC Access Modes | `[ReadWriteMany]` | +| `persistence.public.size` | PVC Storage Request | `1Gi` | +| `persistence.public.dataSource` | PVC data source | `{}` | +| `persistence.storage.enabled` | Enable persistence using PVC (only for FILE driver) | `false` | +| `persistence.storage.existingClaim` | Enable persistence using an existing PVC | `nil` | +| `persistence.storage.storageClass` | PVC Storage Class | `nil` | +| `persistence.storage.accessModes` | PVC Access Modes | `[ReadWriteMany]` | +| `persistence.storage.size` | PVC Storage Request | `5Gi` | +| `persistence.storage.dataSource` | PVC data source | `{}` | + +> See `values.yaml` for more details. ### Redis parameters @@ -287,5 +289,5 @@ extraEnvVarsCM: examplemap ### To 0.7.0 -Redis chart dependency has been upgraded and may not be backwards compatible with previous versions. See [here](https://github.com/bitnami/charts/tree/master/bitnami/redis) for more info. - +- Redis chart dependency has been upgraded and may not be backwards compatible with previous versions. See [here](https://github.com/bitnami/charts/tree/master/bitnami/redis) for more info. +- Storage persitence defaults to `false`, set to `true` if not using Redis, or using any FILE driver diff --git a/charts/invoiceninja/values.yaml b/charts/invoiceninja/values.yaml index aaa1d61..71eba44 100644 --- a/charts/invoiceninja/values.yaml +++ b/charts/invoiceninja/values.yaml @@ -351,7 +351,8 @@ persistence: ## dataSource: {} storage: - enabled: true + ## Only required when using FILE cache or session driver + enabled: false ## Invoice Ninja data Persistent Volume Storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning