Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add helm chart github action #2113

Merged
merged 6 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/lint-helm-charts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Lint and Test Helm Charts

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
lint-test:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v4

- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Run pre-commit
uses: pre-commit/[email protected]
with:
extra_args: helm-docs-built

- name: Set up chart-testing
uses: helm/chart-testing-action@v2

- 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: Run chart-testing
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false
31 changes: 31 additions & 0 deletions .github/workflows/release-helm-charts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release Helm charts

on:
push:
branches:
- main

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up git config
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Run chart-releaser
uses: helm/[email protected]
with:
config: "./cr.yaml"
charts_dir: "chart"
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 4 additions & 0 deletions .github/workflows/sync_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
run: pip install pyyaml
- name: Sync versions
run: python .github/scripts/gradle_to_chart.py
- name: Run pre-commit helm-docs-built
uses: pre-commit/[email protected]
with:
extra_args: helm-docs-built
- name: Set up git config
run: |
git config --global user.name "github-actions[bot]"
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ repos:
language: python
exclude: ^(src/main/resources/static/pdfjs|src/main/resources/static/pdfjs-legacy)
files: ^.*(\.html|\.css|\.js)$
- repo: https://github.com/norwoodj/helm-docs
rev: v1.14.2
hooks:
- id: helm-docs-built
args:
- --chart-search-root=chart
95 changes: 95 additions & 0 deletions chart/stirling-pdf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# stirling-pdf-chart

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: 0.30.1](https://img.shields.io/badge/AppVersion-0.30.1-informational?style=flat-square)

locally hosted web application that allows you to perform various operations on PDF files

**Homepage:** <https://github.com/Stirling-Tools/Stirling-PDF>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Stirling-Tools | | <https://github.com/Stirling-Tools/Stirling-PDF> |

## Source Code

* <https://github.com/Stirling-Tools/Stirling-PDF>

## Chart Repo

Add the following repo to use the chart:

```console
helm repo add stirling-pdf https://stirling-tools.github.io/Stirling-PDF
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| commonLabels | object | `{}` | Labels to apply to all resources |
| containerSecurityContext | object | `{}` | |
| deployment.annotations | object | `{}` | Stirling-pdf Deployment annotations |
| deployment.extraVolumeMounts | list | `[]` | Additional volumes to mount |
| deployment.extraVolumes | list | `[]` | Additional volumes |
| deployment.labels | object | `{}` | |
| deployment.sidecarContainers | object | `{}` | of the chart's content, send notifications... |
| envs | list | `[]` | |
| extraArgs | list | `[]` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"frooodle/s-pdf"` | |
| image.tag | string | `nil` | |
| ingress | object | `{"annotations":{},"enabled":false,"hosts":[],"ingressClassName":null,"labels":{},"pathType":"ImplementationSpecific"}` | Ingress for load balancer |
| ingress.annotations | object | `{}` | Stirling-pdf Ingress annotations |
| ingress.hosts | list | `[]` | Must be provided if Ingress is enabled |
| ingress.ingressClassName | string | `nil` | See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress |
| ingress.labels | object | `{}` | Stirling-pdf Ingress labels |
| nodeSelector | object | `{}` | |
| persistence.accessMode | string | `"ReadWriteOnce"` | |
| persistence.enabled | bool | `false` | |
| persistence.labels | object | `{}` | |
| persistence.path | string | `"/tmp"` | |
| persistence.pv | object | `{"accessMode":"ReadWriteOnce","capacity":{"storage":"8Gi"},"enabled":false,"nfs":{"path":null,"server":null},"pvname":null}` | stirling-pdf data Persistent Volume Storage Class If defined, storageClassName: <storageClass> If set to "-", storageClassName: "", which disables dynamic provisioning If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack) storageClass: "-" volumeName: |
| persistence.size | string | `"8Gi"` | |
| podAnnotations | object | `{}` | Read more about kube2iam to provide access to s3 https://github.com/jtblin/kube2iam |
| podLabels | object | `{}` | ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
| priorityClassName | string | `""` | |
| probes.liveness.failureThreshold | int | `3` | |
| probes.liveness.initialDelaySeconds | int | `5` | |
| probes.liveness.periodSeconds | int | `10` | |
| probes.liveness.successThreshold | int | `1` | |
| probes.liveness.timeoutSeconds | int | `1` | |
| probes.livenessHttpGetConfig.scheme | string | `"HTTP"` | |
| probes.readiness.failureThreshold | int | `3` | |
| probes.readiness.initialDelaySeconds | int | `5` | |
| probes.readiness.periodSeconds | int | `10` | |
| probes.readiness.successThreshold | int | `1` | |
| probes.readiness.timeoutSeconds | int | `1` | |
| probes.readinessHttpGetConfig.scheme | string | `"HTTP"` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| rootPath | string | `"/"` | Rootpath for the application |
| secret.labels | object | `{}` | |
| securityContext | object | `{"enabled":true,"fsGroup":1000}` | does not allow this, try setting securityContext: {} |
| service.annotations | object | `{}` | |
| service.externalPort | int | `8080` | |
| service.externalTrafficPolicy | string | `"Local"` | |
| service.labels | object | `{}` | |
| service.loadBalancerIP | string | `nil` | Only valid if service.type: LoadBalancer |
| service.loadBalancerSourceRanges | list | `[]` | Only valid if service.type: LoadBalancer |
| service.nodePort | string | `nil` | |
| service.servicename | string | `nil` | |
| service.targetPort | string | `nil` | from deployment above. Leave empty to use stirling-pdf directly. |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automountServiceAccountToken | bool | `false` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| serviceMonitor.enabled | bool | `false` | |
| serviceMonitor.labels | object | `{}` | |
| serviceMonitor.metricsPath | string | `"/metrics"` | |
| strategy.type | string | `"RollingUpdate"` | |
| tolerations | list | `[]` | |
| volumePermissions | object | `{"image":{"pullPolicy":"Always","registry":"docker.io","repository":"bitnami/minideb","tag":"buster"}}` | volumePermissions: Change the owner of the persistent volume mountpoint to RunAsUser:fsGroup |
25 changes: 25 additions & 0 deletions chart/stirling-pdf/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{ template "chart.header" . }}

{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

## Chart Repo

Add the following repo to use the chart:

```console
helm repo add stirling-pdf https://docs.stirlingpdf.com/Stirling-PDF/
```

{{ template "chart.valuesSection" . }}
Loading