SearXNG as a stateless Deployment plus a settings ConfigMap, with the four CI steps a new chart needs: publish workflow, change-app-version choice list, ci/searxng/ fixtures and a renovate.json5 block. Three points where the chart is not a cyberchef with another name: * The image entrypoint writes settings.yml into /etc/searxng only when the file is missing. The chart always mounts one by subPath, so the copy and the random-secret sed never run and the container needs no write access there - which is what allows readOnlyRootFilesystem: true. * The signing key is a required OnePasswordItem, not a ConfigMap key. It signs the settings cookie and the image-proxy URLs, and the entrypoint's self-generating fallback cannot fire here, so without it the instance would run on the literal "ultrasecretkey" - which webapp.py refuses with exit 1. * All three probes use /healthz, the only path the bot detection lets through unconditionally. Measured: with the limiter active, "/" answers 429 while /healthz still answers 200. ingress.domain is read a second time outside the Ingress template, for SEARXNG_BASE_URL, and carries its own required() there - so it stays mandatory with the Ingress switched off. The Renovate versioning regex deviates from the plan on the issue and matches the commit hash WITHOUT capturing it. Renovate parses a "build" group with Number.parseInt, so a hash becomes the digits leading it; measured on renovate 41.173.1 and 44.48.0, the planned form reports an image pushed earlier the same day as an update to a newer one. Reasoning in the block and in README.
103 lines
3.8 KiB
YAML
103 lines
3.8 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
|
|
# freesailarr is deliberately absent: none of its nine 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@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@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@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 |