Add Helm chart for calibre-web deployment
This commit introduces a new Helm chart for deploying calibre-web on Kubernetes. The chart includes essential templates for deployment, service, ingress, and persistent volume claims, along with default values configured in a `values.yaml` file. The addition of the Helm chart enables easier deployment and management of calibre-web, allowing users to customize settings like the replica count, image settings, service type, and storage options through the `values.yaml`. A GitHub Actions workflow (`build-chart-calibre-web.yml`) is also included to automate the packaging and uploading of the Helm chart upon updates to the main branch. The structure and organization of the templates adhere to Helm best practices, ensuring compatibility and ease of use. There are no breaking changes associated with this addition, but users should review the `values.yaml` for configurable options.
This commit was merged in pull request #63.
This commit is contained in:
43
.gitea/workflows/build-chart-calibre-web.yml
Normal file
43
.gitea/workflows/build-chart-calibre-web.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
name: "Build Helm Chart"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "charts/calibre-web/Chart.yaml"
|
||||
|
||||
jobs:
|
||||
helm-package:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
APP: charts/calibre-web
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set Helm Chart App Name and Version
|
||||
id: get_version
|
||||
run: |
|
||||
APP_NAME=$(grep -oP '(?<=^name: ).*' ${{ env.APP }}/Chart.yaml)
|
||||
echo "Helm Chart App Name: $APP_NAME"
|
||||
echo "::set-output name=app::$APP_NAME"
|
||||
|
||||
CHART_VERSION=$(grep -oP '(?<=^version: ).*' ${{ env.APP }}/Chart.yaml)
|
||||
echo "Helm Chart version: $CHART_VERSION"
|
||||
echo "::set-output name=tag::$CHART_VERSION"
|
||||
|
||||
- name: Setup Helm
|
||||
run: |
|
||||
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.4 && chmod +x /usr/local/bin/helm
|
||||
helm version
|
||||
|
||||
- name: Package Helm Chart
|
||||
run: |
|
||||
helm dependency update ${{ env.APP }}
|
||||
helm lint ${{ env.APP }}
|
||||
helm package ${{ env.APP }}
|
||||
|
||||
- name: Upload Helm Package to repo
|
||||
run: |
|
||||
curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts
|
||||
Reference in New Issue
Block a user