Files
helm-charts/.github/workflows/change-app-version.yml
T
jklein 79b7e44fdc
Validate Helm Charts / Detect changed charts (pull_request) Successful in 3s
Validate Helm Charts / Resource quantities (pull_request) Successful in 11s
Validate Helm Charts / Build garage (pull_request) Successful in 6s
Validate Helm Charts / Trivy config garage (pull_request) Successful in 16s
Install-test / Install-test garage (pull_request) Successful in 1m15s
Validate Helm Charts / Install-test (pull_request) Successful in 1m15s
feat(garage): new chart for the Garage object store
One Garage node with replication_factor = 1, built from template-chart to the
style guide rather than copied from upstream's in-tree chart (Gitea #81). The
single-node trade is deliberate and its price is named at the value: the factor
applies to the metadata as well, where upstream calls a corrupted database
"generally not recoverable" and a replicated volume replicates the corruption
faithfully. The three countermeasures that work at factor 1 are therefore
mandatory, not optional - metadata_fsync = true (off in Garage's defaults), the
automatic metadata snapshots, and those snapshots on a second PVC.

Storage: PVC 1 carries metadata_dir AND data_dir as two subdirectories, because
volume snapshots are atomic per volume and that is what keeps index and blocks
consistent with each other; PVC 2 carries metadata_snapshots_dir, because a
recovery point must not die with the volume whose corruption it should repair.
Garage creates all three directories itself, which matters because the image is
FROM scratch and has no mkdir.

Two corrections to the approved plan, both verified against the source at tag
v2.4.1 and decided on the issue before implementation:

- The RPC secret arrives as GARAGE_RPC_SECRET via secretKeyRef, not through
  rpc_secret_file. The file form cannot work in a non-root pod:
  read_secret_file rejects any mode with a group or other bit set
  (src/garage/secrets.rs:144, mask 0o077) while the kubelet OR-s the group-read
  bit onto every file of a secret volume once fsGroup is set
  (pkg/volume/volume_linux.go), and Kubernetes can set the group of such a file
  but never its owner. The mechanism is documented at the value so the next
  round does not "fix" it back.
- The first start is done by the server, not by hand: garage server
  --single-node creates the layout in-process before any listener opens, is
  idempotent on the layout version and has no --version argument that could be
  reused, and --default-access-key/--default-bucket import key and bucket FROM
  the vault item. Both premises of the original "manual first start" decision
  fell with that.

Probes follow from the same source reading: readiness is GET /health on the
admin port, which answers 503 while no layout exists; liveness and startup are
a TCP connect, because a probe that can only fail would restart a node waiting
for its layout forever (same lesson as zipline, README 12.3). The S3 listener
binds independently of the layout, so a TCP probe on 3900 would have been the
lie the plan warned about.

CI: fixtures under ci/garage/ rather than an exclusion - with --single-node the
pod reaches Ready on its own, which makes the install-test an assertion about
the layout, the one-PVC subdirectory layout and readOnlyRootFilesystem instead
of a formality. The Renovate block carries a regex versioning anchored to
^v<major>.<minor>.<patch>$, because the registry receives 40-character
commit-SHA tags almost daily (measured 2026-10-03: the newest 22 tags are all
of that kind) and the four v1.99.x-internal builds sort above the v1.3.x line.

Part of #81
2026-10-03 20:29:38 +00:00

109 lines
4.1 KiB
YAML

name: Change App-Version
on:
workflow_dispatch:
inputs:
app-version:
required: true
type: string
description: "change the version of the underlying application"
chart-location:
required: false
type: string
default: "."
description: "location of the helm chart"
chart-name:
required: true
type: choice
description: "helm chart to be updated"
options:
- zipline
- calibre-web-automated
- samba
- teamspeak-server
- urlaubsverwaltung
- apache-tika
- gotenberg
- homeassistant
- satisfactory
- cyberchef
- matrix-synapse
- outline
- paperless-ngx
- patchmon
- rallly
- voucher-vault
- minecraft-router
- minecraft-server
- rss-bridge
- searxng
- bentopdf
- ytdlp-web-player
- sure
- valkey
- stalwart
- garage
# freesailarr is deliberately absent: none of its ten images takes
# its tag from appVersion (they are all pinned in its values.yaml),
# so this workflow would rewrite appVersion and republish the chart
# without changing a single deployed image. Update its images through
# a Renovate PR, and its appVersion by hand.
workflow_call:
inputs:
app-version:
required: true
type: string
description: "change the version of the underlying application"
chart-location:
required: false
type: string
default: "."
description: "location of the helm chart"
chart-name:
required: true
type: string
description: "name of the helm chart"
jobs:
change-app-version:
runs-on: ubuntu-latest
steps:
- name: "Configure OP-Connect"
uses: 1password/load-secrets-action/configure@70062d7a876d3eb6334754fa26efd2fbd90c32f2 # v5
with:
connect-host: https://op-connect.jk-dev.de
- name: "Load GitHub Credentials"
id: load-jk-cluster-bot-creds
uses: 1password/load-secrets-action@70062d7a876d3eb6334754fa26efd2fbd90c32f2 # v5
env:
OP_CONNECT_TOKEN: ${{ secrets.OP_CONNECT_TOKEN }}
JK_CLUSTER_BOT_TOKEN: op://GitHub-Actions/github-helm-charts-push-token/credential
JK_CLUSTER_USERNAME: op://GitHub-Actions/github-helm-charts-push-token/username
JK_CLUSTER_EMAIL: op://GitHub-Actions/github-helm-charts-push-token/email
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
token: ${{ env.JK_CLUSTER_BOT_TOKEN }}
- name: "Get Chart Version"
run: |
CHART_VERSION=$(grep '^version:' ${{ inputs.chart-name }}/Chart.yaml | awk '{print $2}')
CHART_PART=$(echo $CHART_VERSION | cut -d'+' -f1)
echo "CHART_VERSION=$CHART_PART" >> $GITHUB_ENV
working-directory: ${{ inputs.chart-location }}
- name: "Get new Chart Version"
run: |
APP_VERSION_NORMALIZED=$(echo "${{ inputs.app-version }}" | tr '-' '.')
NEW_VERSION="${CHART_VERSION}+up${APP_VERSION_NORMALIZED}"
sed -i "s/^version:.*/version: $NEW_VERSION/" ${{ inputs.chart-name }}/Chart.yaml
sed -i "s/^appVersion:.*/appVersion: ${{ inputs.app-version }}/" ${{ inputs.chart-name }}/Chart.yaml
working-directory: ${{ inputs.chart-location }}
- name: "View chart-directory contents"
run: ls -al
working-directory: ${{ inputs.chart-location }}
- name: "View helm-chart.yaml"
run: cat Chart.yaml
working-directory: ${{ inputs.chart-location }}/${{ inputs.chart-name }}
- name: Commit and Push Changes
run: |
git config --global user.name '${{ env.JK_CLUSTER_USERNAME }}'
git config --global user.email '${{ env.JK_CLUSTER_EMAIL }}'
git commit -am "Updated ${{ inputs.chart-name }} application version to ${{ inputs.app-version }}"
git push