Compare commits

..

2 Commits

Author SHA1 Message Date
volker.raschek 86e05cfd5c chore(deps): update library/node to 24.7.0-alpine
Helm / helm-unittest (push) Successful in 7s
Helm / helm-lint (push) Successful in 15s
2025-09-30 17:21:32 +02:00
volker.raschek 52e696a76f fix(renovate): group nnode packages 2025-09-30 17:20:49 +02:00
15 changed files with 700 additions and 540 deletions
+45 -56
View File
@@ -1,65 +1,61 @@
#!/bin/bash #!/bin/bash
set -e -o pipefail set -e
chart_file="Chart.yaml" CHART_FILE="Chart.yaml"
if [ ! -f "${chart_file}" ]; then if [ ! -f "${CHART_FILE}" ]; then
echo "ERROR: ${chart_file} not found!" 1>&2 echo "ERROR: ${CHART_FILE} not found!" 1>&2
exit 1 exit 1
fi fi
default_new_tag="$(git tag --sort=-version:refname | head -n 1)" DEFAULT_NEW_TAG="$(git tag --sort=-version:refname | head -n 1)"
default_old_tag="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)" DEFAULT_OLD_TAG="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)"
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
echo "Enter start tag [${default_old_tag}]:" read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
read -r old_tag if [ -z "${OLD_TAG}" ]; then
if [ -z "${old_tag}" ]; then OLD_TAG="${DEFAULT_OLD_TAG}"
old_tag="${default_old_tag}"
fi fi
while [ -z "$(git tag --list "${old_tag}")" ]; do while [ -z "$(git tag --list "${OLD_TAG}")" ]; do
echo "ERROR: Tag '${old_tag}' not found!" 1>&2 echo "ERROR: Tag '${OLD_TAG}' not found!" 1>&2
echo "Enter start tag [${default_old_tag}]:" read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
read -r old_tag if [ -z "${OLD_TAG}" ]; then
if [ -z "${old_tag}" ]; then OLD_TAG="${DEFAULT_OLD_TAG}"
old_tag="${default_old_tag}"
fi fi
done done
else else
old_tag=${1} OLD_TAG=${1}
if [ -z "$(git tag --list "${old_tag}")" ]; then if [ -z "$(git tag --list "${OLD_TAG}")" ]; then
echo "ERROR: Tag '${old_tag}' not found!" 1>&2 echo "ERROR: Tag '${OLD_TAG}' not found!" 1>&2
exit 1 exit 1
fi fi
fi fi
if [ -z "${2}" ]; then if [ -z "${2}" ]; then
echo "Enter end tag [${default_new_tag}]:" read -p "Enter end tag [${DEFAULT_NEW_TAG}]: " NEW_TAG
read -r new_tag if [ -z "${NEW_TAG}" ]; then
if [ -z "${new_tag}" ]; then NEW_TAG="${DEFAULT_NEW_TAG}"
new_tag="${default_new_tag}"
fi fi
while [ -z "$(git tag --list "${new_tag}")" ]; do while [ -z "$(git tag --list "${NEW_TAG}")" ]; do
echo "ERROR: Tag '${new_tag}' not found!" 1>&2 echo "ERROR: Tag '${NEW_TAG}' not found!" 1>&2
echo "Enter end tag [${default_new_tag}]:" read -p "Enter end tag [${DEFAULT_NEW_TAG}]: " NEW_TAG
read -r new_tag if [ -z "${NEW_TAG}" ]; then
if [ -z "${new_tag}" ]; then NEW_TAG="${DEFAULT_NEW_TAG}"
new_tag="${default_new_tag}"
fi fi
done done
else else
new_tag=${2} NEW_TAG=${2}
if [ -z "$(git tag --list "${new_tag}")" ]; then if [ -z "$(git tag --list "${NEW_TAG}")" ]; then
echo "ERROR: Tag '${new_tag}' not found!" 1>&2 echo "ERROR: Tag '${NEW_TAG}' not found!" 1>&2
exit 1 exit 1
fi fi
fi fi
change_log_yaml=$(mktemp) CHANGE_LOG_YAML=$(mktemp)
echo "[]" > "${change_log_yaml}" echo "[]" > "${CHANGE_LOG_YAML}"
function map_type_to_kind() { function map_type_to_kind() {
case "${1}" in case "${1}" in
@@ -84,42 +80,35 @@ function map_type_to_kind() {
esac esac
} }
commit_titles="$(git log --pretty=format:"%s" "${old_tag}..${new_tag}")" COMMIT_TITLES="$(git log --pretty=format:"%s" "${OLD_TAG}..${NEW_TAG}")"
echo "INFO: Generate change log entries from ${old_tag} until ${new_tag}" echo "INFO: Generate change log entries from ${OLD_TAG} until ${NEW_TAG}"
while IFS= read -r line; do while IFS= read -r line; do
if [[ "${line}" =~ ^([a-zA-Z]+)(\([^\)]+\))?\:\ (.+)$ ]]; then if [[ "${line}" =~ ^([a-zA-Z]+)(\([^\)]+\))?\:\ (.+)$ ]]; then
type="${BASH_REMATCH[1]}" TYPE="${BASH_REMATCH[1]}"
kind=$(map_type_to_kind "${type}") KIND=$(map_type_to_kind "${TYPE}")
if [ "${kind}" == "skip" ]; then if [ "${KIND}" == "skip" ]; then
continue continue
fi fi
desc="${BASH_REMATCH[3]}" DESC="${BASH_REMATCH[3]}"
echo "- ${kind}: ${desc}" echo "- ${KIND}: ${DESC}"
jq --arg kind "${kind}" --arg description "${desc}" '. += [ $ARGS.named ]' < "${change_log_yaml}" > "${change_log_yaml}.new" jq --arg kind "${KIND}" --arg description "${DESC}" '. += [ $ARGS.named ]' < "${CHANGE_LOG_YAML}" > "${CHANGE_LOG_YAML}.new"
mv "${change_log_yaml}.new" "${change_log_yaml}" mv "${CHANGE_LOG_YAML}.new" "${CHANGE_LOG_YAML}"
fi fi
done <<< "${commit_titles}" done <<< "${COMMIT_TITLES}"
if [ -s "${change_log_yaml}" ]; then if [ -s "${CHANGE_LOG_YAML}" ]; then
yq --inplace --input-format json --output-format yml "${change_log_yaml}" yq --inplace --input-format json --output-format yml "${CHANGE_LOG_YAML}"
yq --no-colors --inplace ".annotations.\"artifacthub.io/changes\" |= loadstr(\"${change_log_yaml}\") | sort_keys(.)" "${chart_file}" yq --no-colors --inplace ".annotations.\"artifacthub.io/changes\" |= loadstr(\"${CHANGE_LOG_YAML}\") | sort_keys(.)" "${CHART_FILE}"
else else
echo "ERROR: Changelog file is empty: ${change_log_yaml}" 1>&2 echo "ERROR: Changelog file is empty: ${CHANGE_LOG_YAML}" 1>&2
exit 1 exit 1
fi fi
rm "${change_log_yaml}" rm "${CHANGE_LOG_YAML}"
regexp=".*-alpha-[0-9]+(\.[0-9]+){,2}$"
if [[ "${new_tag}" =~ $regexp ]]; then
yq --inplace '.annotations."artifacthub.io/prerelease" = "true"' "${chart_file}"
else
yq --inplace '.annotations."artifacthub.io/prerelease" = "false"' "${chart_file}"
fi
@@ -1,41 +0,0 @@
name: Upload ArtifactHub Metadata
on:
schedule:
- cron: '0 3 1 * *'
workflow_dispatch:
jobs:
upload-metadata:
name: "Upload artifacthub-repo.yml to OCI registry"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.3
- uses: docker/login-action@v4.2.0
with:
registry: ${{ github.server_url }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- uses: oras-project/setup-oras@v2.0.0
with:
version: 1.3.2 # renovate: datasource=github-tags depName=oras-project/oras extractVersion='^v?(?<version>.*)$'
- name: Extract meta information
run: |
echo "GITEA_SERVER_HOSTNAME=$(echo "${GITHUB_SERVER_URL}" | cut -d '/' -f 3)" >> $GITHUB_ENV
echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2 | sed --regexp-extended 's/-charts?//g')" >> $GITHUB_ENV
echo "REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 1)" >> $GITHUB_ENV
- name: Push artifacthub-repo.yml
run: |
oras push ${GITEA_SERVER_HOSTNAME}/${REPOSITORY_OWNER}/${REPOSITORY_NAME}:artifacthub.io \
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
- name: Push public cosign key
env:
COSIGN_PUBLIC_KEY: ${{ vars.COSIGN_PUBLIC_KEY }}
run: |
echo "${COSIGN_PUBLIC_KEY}" > cosign.pub
oras push ${GITEA_SERVER_HOSTNAME}/${REPOSITORY_OWNER}/${REPOSITORY_NAME}:cosign.pub \
--artifact-type application/vnd.dev.cosign.public-key.v1 \
--annotation org.opencontainers.image.title=cosign.pub \
cosign.pub:application/vnd.dev.cosign.public-key.v1
+4 -3
View File
@@ -15,14 +15,15 @@ on:
jobs: jobs:
generate-parameters: generate-parameters:
container: container:
image: docker.io/library/node:26.3.0-alpine image: docker.io/library/node:24.7.0-alpine
runs-on: ubuntu-latest runs-on:
- ubuntu-latest
steps: steps:
- name: Install tooling - name: Install tooling
run: | run: |
apk update apk update
apk add git npm apk add git npm
- uses: actions/checkout@v6.0.3 - uses: actions/checkout@v5.0.0
- name: Generate parameter section in README - name: Generate parameter section in README
run: | run: |
npm install npm install
+21 -16
View File
@@ -12,26 +12,31 @@ on:
jobs: jobs:
helm-lint: helm-lint:
runs-on: ubuntu-latest container:
image: docker.io/volkerraschek/helm:3.19.0
runs-on:
- ubuntu-latest
steps: steps:
- uses: actions/checkout@v6.0.3 - name: Install tooling
- uses: azure/setup-helm@v5.0.0 run: |
with: apk update
version: "v4.2.1" # renovate: datasource=github-tags depName=helm/helm apk add git npm
- uses: actions/checkout@v5.0.0
- name: Lint helm files - name: Lint helm files
run: | run: |
helm lint --values values.yaml . helm lint --values values.yaml .
helm-unittest: helm-unittest:
runs-on: ubuntu-latest container:
image: docker.io/volkerraschek/helm:3.19.0
runs-on:
- ubuntu-latest
steps: steps:
- uses: actions/checkout@v6.0.3 - name: Install tooling
- uses: azure/setup-helm@v5.0.0 run: |
with: apk update
version: "v4.2.1" # renovate: datasource=github-tags depName=helm/helm apk add git npm
- env: - uses: actions/checkout@v5.0.0
HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest - name: Unittest
name: Install helm-unittest run: |
run: helm plugin install --verify=false --version "${HELM_UNITTEST_VERSION}" https://github.com/helm-unittest/helm-unittest helm unittest --strict --file 'unittests/**/*.yaml' ./
- name: Execute helm unittests
run: helm unittest --strict --file 'unittests/**/*.yaml' .
+8 -6
View File
@@ -15,14 +15,15 @@ on:
jobs: jobs:
markdown-link-checker: markdown-link-checker:
container: container:
image: docker.io/library/node:26.3.0-alpine image: docker.io/library/node:24.7.0-alpine
runs-on: ubuntu-latest runs-on:
- ubuntu-latest
steps: steps:
- name: Install tooling - name: Install tooling
run: | run: |
apk update apk update
apk add git npm apk add git npm
- uses: actions/checkout@v6.0.3 - uses: actions/checkout@v5.0.0
- name: Verify links in markdown files - name: Verify links in markdown files
run: | run: |
npm install npm install
@@ -30,14 +31,15 @@ jobs:
markdown-lint: markdown-lint:
container: container:
image: docker.io/library/node:26.3.0-alpine image: docker.io/library/node:24.7.0-alpine
runs-on: ubuntu-latest runs-on:
- ubuntu-latest
steps: steps:
- name: Install tooling - name: Install tooling
run: | run: |
apk update apk update
apk add git apk add git
- uses: actions/checkout@v6.0.3 - uses: actions/checkout@v5.0.0
- name: Lint markdown files - name: Lint markdown files
run: | run: |
npm install npm install
+23 -125
View File
@@ -1,10 +1,5 @@
name: Release name: Release
env:
GPG_PRIVATE_KEY_FILE: ${{ runner.temp }}/private.key
GPG_PRIVATE_KEY_FINGERPRINT: ${{ vars.GPG_PRIVATE_KEY_FINGERPRINT }}
GPG_PRIVATE_KEY_PASSPHRASE_FILE: ${{ runner.temp }}/passphrase.txt
on: on:
push: push:
tags: tags:
@@ -12,60 +7,16 @@ on:
jobs: jobs:
publish-chart: publish-chart:
container:
image: docker.io/volkerraschek/helm:3.19.0
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: volker-raschek/cosign-installer@v4.1.2-rc4 - name: Install packages via apk
with:
cosign-release: "v3.1.1" # renovate: datasource=github-tags depName=sigstore/cosign
- uses: azure/setup-helm@v5.0.0
with:
version: "v4.2.1" # renovate: datasource=github-tags depName=helm/helm
- name: Install helm plugins
env:
HELM_SIGSTORE_VERSION: "0.3.0" # renovate: datasource=github-tags depName=sigstore/helm-sigstore extractVersion='^v(?<version>\d+\.\d+\.\d+)$'
HELM_SCHEMA_VALUES_VERSION: "2.5.0" # renovate: datasource=github-tags depName=losisin/helm-values-schema-json extractVersion='^v(?<version>\d+\.\d+\.\d+)$'
HELM_UNITTEST_VERSION: "1.1.1" # renovate: datasource=github-tags depName=helm-unittest/helm-unittest extractVersion='^v(?<version>\d+\.\d+\.\d+)$'
run: | run: |
helm plugin install --verify=false https://github.com/sigstore/helm-sigstore.git --version "${HELM_SIGSTORE_VERSION}" 1> /dev/null apk update
helm plugin install --verify=false https://github.com/losisin/helm-values-schema-json.git --version "${HELM_SCHEMA_VALUES_VERSION}" 1> /dev/null apk add git npm jq yq
helm plugin install --verify=false https://github.com/helm-unittest/helm-unittest.git --version "${HELM_UNITTEST_VERSION}" 1> /dev/null
helm plugin list
- name: GPG configuration - uses: actions/checkout@v5.0.0
env:
GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
# Configure GPG and GPG Agent
mkdir --parents "${HOME}/.gnupg"
chmod 0700 "${HOME}/.gnupg"
cat > "${HOME}/.gnupg/gpg.conf" <<EOF
use-agent
pinentry-mode loopback
EOF
cat > "${HOME}/.gnupg/gpg-agent.conf" <<EOF
allow-loopback-pinentry
max-cache-ttl 86400
default-cache-ttl 86400
EOF
gpgconf --kill gpg-agent
gpgconf --launch gpg-agent
# Import GPG private key
cat 1> "${GPG_PRIVATE_KEY_PASSPHRASE_FILE}" <<< "${GPG_PRIVATE_KEY_PASSPHRASE}"
cat 1> "${GPG_PRIVATE_KEY_FILE}" <<< "${GPG_PRIVATE_KEY}"
gpg --batch --yes --passphrase-fd 0 --import "${GPG_PRIVATE_KEY_FILE}" <<< "${GPG_PRIVATE_KEY_PASSPHRASE}"
# Export GPG keyring
gpg --batch --yes --export "${GPG_PRIVATE_KEY_FINGERPRINT}" 1> "${HOME}/.gnupg/pubring.gpg"
gpg --batch --yes --passphrase-fd 0 --export-secret-keys "${GPG_PRIVATE_KEY_FINGERPRINT}" 1> "${HOME}/.gnupg/secring.gpg" <<< "${GPG_PRIVATE_KEY_PASSPHRASE}"
- uses: actions/checkout@v6.0.3
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -77,10 +28,9 @@ jobs:
- name: Extract meta information - name: Extract meta information
run: | run: |
echo "GITEA_SERVER_HOSTNAME=$(echo "${GITHUB_SERVER_URL}" | cut --delimiter '/' --fields 3)" >> $GITHUB_ENV
echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut --delimiter '/' --fields 2 | sed --regexp-extended 's/-charts?//g')" >> $GITHUB_ENV echo "REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2 | sed --regexp-extended 's/-charts?//g')" >> $GITHUB_ENV
echo "REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut --delimiter '/' --fields 1)" >> $GITHUB_ENV echo "REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 1)" >> $GITHUB_ENV
- name: Update Helm Chart version in README.md - name: Update Helm Chart version in README.md
run: sed -i -E "s/^CHART_VERSION=.*/CHART_VERSION=${PACKAGE_VERSION}/g" README.md run: sed -i -E "s/^CHART_VERSION=.*/CHART_VERSION=${PACKAGE_VERSION}/g" README.md
@@ -88,76 +38,24 @@ jobs:
- name: Package chart - name: Package chart
run: | run: |
helm dependency build helm dependency build
helm package \ helm package --version "${PACKAGE_VERSION}" ./
--sign \
--key "$(gpg --with-colons --list-keys "${GPG_PRIVATE_KEY_FINGERPRINT}" | grep uid | cut --delimiter ':' --fields 10)" \
--keyring "${HOME}/.gnupg/secring.gpg" \
--passphrase-file "${GPG_PRIVATE_KEY_PASSPHRASE_FILE}" \
--version "${PACKAGE_VERSION}" ./
- uses: docker/login-action@v4.2.0 - name: Upload Chart to ChartMuseum
with:
registry: ${{ github.server_url }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- name: Upload Chart to Gitea (OCI)
env: env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
run: |
helm push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz oci://${GITEA_SERVER_HOSTNAME}/${REPOSITORY_OWNER}
cosign sign --yes --upload=true --key=env://COSIGN_PRIVATE_KEY ${GITEA_SERVER_HOSTNAME}/${REPOSITORY_OWNER}/${REPOSITORY_NAME}:${PACKAGE_VERSION}
- name: Upload Chart to Gitea (Helm)
env:
GITEA_REGISTRY_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
run: |
curl \
--fail \
--show-error \
--request POST \
--user "${REPOSITORY_OWNER}:${GITEA_REGISTRY_TOKEN}" \
--upload-file "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz" \
https://${GITEA_SERVER_HOSTNAME}/api/packages/${REPOSITORY_OWNER}/helm/api/charts
# NOTE:
# Gitea does currently not support uploading Helm chart provenance files, so we skip this step for now. Once
# Gitea supports this, we can simply uncomment the following lines to upload the provenance file as well.
#
# https://github.com/helm/helm/issues/31866
#
# if [ -f "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz.prov" ]; then
# curl \
# --fail \
# --show-error \
# --request POST \
# --user "${CHARTMUSEUM_USERNAME}:${CHARTMUSEUM_PASSWORD}" \
# --upload-file "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz.prov" \
# https://${GITEA_SERVER_HOSTNAME}/api/packages/${REPOSITORY_OWNER}/helm/api/prov
# fi
- name: Upload Chart to Chartmuseum (Helm)
env:
CHARTMUSEUM_HOSTNAME: ${{ vars.CHARTMUSEUM_HOSTNAME }}
CHARTMUSEUM_USERNAME: ${{ secrets.CHARTMUSEUM_USERNAME }}
CHARTMUSEUM_PASSWORD: ${{ secrets.CHARTMUSEUM_PASSWORD }} CHARTMUSEUM_PASSWORD: ${{ secrets.CHARTMUSEUM_PASSWORD }}
CHARTMUSEUM_REPOSITORY: ${{ vars.CHARTMUSEUM_REPOSITORY }} CHARTMUSEUM_REPOSITORY: ${{ vars.CHARTMUSEUM_REPOSITORY }}
CHARTMUSEUM_USERNAME: ${{ secrets.CHARTMUSEUM_USERNAME }}
CHARTMUSEUM_HOSTNAME: ${{ vars.CHARTMUSEUM_HOSTNAME }}
run: | run: |
curl \ helm repo add --username ${CHARTMUSEUM_USERNAME} --password ${CHARTMUSEUM_PASSWORD} chartmuseum https://${CHARTMUSEUM_HOSTNAME}/${CHARTMUSEUM_REPOSITORY}
--fail \ helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz chartmuseum
--show-error \ helm repo remove chartmuseum
--request POST \
--user "${CHARTMUSEUM_USERNAME}:${CHARTMUSEUM_PASSWORD}" \
--upload-file "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz" \
https://${CHARTMUSEUM_HOSTNAME}/api/${CHARTMUSEUM_REPOSITORY}/charts
if [ -f "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz.prov" ]; then - name: Upload Chart to Gitea
curl \ env:
--fail \ GITEA_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
--show-error \ GITEA_SERVER_URL: ${{ github.server_url }}
--request POST \ run: |
--user "${CHARTMUSEUM_USERNAME}:${CHARTMUSEUM_PASSWORD}" \ helm repo add --username ${REPOSITORY_OWNER} --password ${GITEA_PACKAGE_REGISTRY_TOKEN} gitea ${GITEA_SERVER_URL}/api/packages/${REPOSITORY_OWNER}/helm
--upload-file ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz.prov \ helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz gitea
https://${CHARTMUSEUM_HOSTNAME}/api/${CHARTMUSEUM_REPOSITORY}/prov helm repo remove gitea
fi
-1
View File
@@ -1,5 +1,4 @@
charts charts
cosign*
node_modules node_modules
target target
values2.yml values2.yml
-11
View File
@@ -1,11 +0,0 @@
{
"files.associations": {
".gitea/workflows/*.yaml": "github-actions-workflow"
},
"yaml.schemas": {
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/v1.1.1/schema/helm-testsuite.json": [
"/unittests/**/*.yaml"
]
},
"yaml.schemaStore.enable": true
}
+14 -18
View File
@@ -1,28 +1,24 @@
annotations: annotations:
artifacthub.io/license: MIT
artifacthub.io/links: | artifacthub.io/links: |
- name: Prometheus PostgreSQL exporter (binary) - name: Prometheus PostgreSQL exporter (binary)
url: https://github.com/prometheus-community/postgres_exporter url: https://github.com/prometheus-community/postgres_exporter
- name: support - name: support
url: https://git.cryptic.systems/volker.raschek/prometheus-postgres-exporter/issues url: https://git.cryptic.systems/volker.raschek/prometheus-postgres-exporter/issues
artifacthub.io/operator: "false"
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 3B0CE9853CAD76076260025383D342258456906E
url: https://keys.openpgp.org/vks/v1/by-fingerprint/3B0CE9853CAD76076260025383D342258456906E
apiVersion: v2 apiVersion: v2
appVersion: "0.19.1"
description: Prometheus metric exporter for PostgreSQL
home: https://git.cryptic.systems/volker.raschek/prometheus-postgres-exporter
# icon: https://annotations.example.com/icon.png
keywords:
- prometheus
- prometheus-exporter
- postgres-postgres-exporter
- postgres-exporter
name: prometheus-postgres-exporter name: prometheus-postgres-exporter
sources: description: Prometheus metric exporter for PostgreSQL
- https://github.com/prometheus-community/postgres_exporter
- https://git.cryptic.systems/volker.raschek/prometheus-postgres-exporter
type: application type: application
version: "0.1.0" version: "0.1.0"
appVersion: "0.18.1"
# icon: https://annotations.example.com/icon.png
keywords:
- prometheus
- prometheus-exporter
- postgres-postgres-exporter
- postgres-exporter
sources:
- https://github.com/prometheus-community/postgres_exporter
- https://git.cryptic.systems/volker.raschek/prometheus-postgres-exporter
+2 -2
View File
@@ -4,13 +4,13 @@ CONTAINER_RUNTIME?=$(shell which podman)
# HELM_IMAGE # HELM_IMAGE
HELM_IMAGE_REGISTRY_HOST?=docker.io HELM_IMAGE_REGISTRY_HOST?=docker.io
HELM_IMAGE_REPOSITORY?=volkerraschek/helm HELM_IMAGE_REPOSITORY?=volkerraschek/helm
HELM_IMAGE_VERSION?=3.19.2 # renovate: datasource=docker registryUrl=https://docker.io depName=volkerraschek/helm HELM_IMAGE_VERSION?=3.19.0 # renovate: datasource=docker registryUrl=https://docker.io depName=volkerraschek/helm
HELM_IMAGE_FULLY_QUALIFIED=${HELM_IMAGE_REGISTRY_HOST}/${HELM_IMAGE_REPOSITORY}:${HELM_IMAGE_VERSION} HELM_IMAGE_FULLY_QUALIFIED=${HELM_IMAGE_REGISTRY_HOST}/${HELM_IMAGE_REPOSITORY}:${HELM_IMAGE_VERSION}
# NODE_IMAGE # NODE_IMAGE
NODE_IMAGE_REGISTRY_HOST?=docker.io NODE_IMAGE_REGISTRY_HOST?=docker.io
NODE_IMAGE_REPOSITORY?=library/node NODE_IMAGE_REPOSITORY?=library/node
NODE_IMAGE_VERSION?=25.2.1-alpine # renovate: datasource=docker registryUrl=https://docker.io depName=docker.io/library/node packageName=library/node NODE_IMAGE_VERSION?=24.7.0-alpine # renovate: datasource=docker registryUrl=https://docker.io depName=docker.io/library/node packageName=library/node
NODE_IMAGE_FULLY_QUALIFIED=${NODE_IMAGE_REGISTRY_HOST}/${NODE_IMAGE_REPOSITORY}:${NODE_IMAGE_VERSION} NODE_IMAGE_FULLY_QUALIFIED=${NODE_IMAGE_REGISTRY_HOST}/${NODE_IMAGE_REPOSITORY}:${NODE_IMAGE_VERSION}
# MISSING DOT # MISSING DOT
+20 -60
View File
@@ -16,15 +16,11 @@ Chapter [configuration and installation](#helm-configuration-and-installation) d
and use it to deploy the exporter. It also contains further configuration examples. and use it to deploy the exporter. It also contains further configuration examples.
Furthermore, this helm chart contains unit tests to detect regressions and stabilize the deployment. Additionally, this Furthermore, this helm chart contains unit tests to detect regressions and stabilize the deployment. Additionally, this
helm chart is tested for deployment scenarios with **ArgoCD**, but please keep in mind, that this chart supports the helm chart is tested for deployment scenarios with **ArgoCD**.
*[Automatically Roll Deployment](https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments)*
concept of Helm, which can trigger unexpected rolling releases. Further configuration instructions are described in a
separate [chapter](#argocd).
## Helm: configuration and installation ## Helm: configuration and installation
1. A helm chart repository must be configured, to pull the helm charts from. The helm charts can either be pulled from 1. A helm chart repository must be configured, to pull the helm charts from.
the classic helm chart repository or OCI registry.
2. All available [parameters](#parameters) are documented in detail below. The parameters can be defined via the helm 2. All available [parameters](#parameters) are documented in detail below. The parameters can be defined via the helm
`--set` flag or directly as part of a `values.yaml` file. The following example defines the `prometheus-exporter` `--set` flag or directly as part of a `values.yaml` file. The following example defines the `prometheus-exporter`
repository and use the `--set` flag for a basic deployment. repository and use the `--set` flag for a basic deployment.
@@ -37,7 +33,7 @@ separate [chapter](#argocd).
```bash ```bash
helm repo add prometheus-exporters https://charts.cryptic.systems/prometheus-exporters helm repo add prometheus-exporters https://charts.cryptic.systems/prometheus-exporters
helm repo update helm repo update
CHART_VERSION=0.5.12 CHART_VERSION=0.5.4
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \ helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
--set 'config.database.secret.databaseUsername=postgres' \ --set 'config.database.secret.databaseUsername=postgres' \
--set 'config.database.secret.databasePassword=postgres' \ --set 'config.database.secret.databasePassword=postgres' \
@@ -46,25 +42,13 @@ helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheu
--set 'prometheus.metrics.serviceMonitor.enabled=true' --set 'prometheus.metrics.serviceMonitor.enabled=true'
``` ```
Alternatively, the deployment of the helm charts can also be done via an OCI registry:
```bash
CHART_VERSION=0.5.12
helm install "oci://git.cryptic.systems/volker.raschek/prometheus-postgres-exporter:${CHART_VERSION}" \
--set 'config.database.secret.databaseUsername=postgres' \
--set 'config.database.secret.databasePassword=postgres' \
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
--set 'prometheus.metrics.enabled=true' \
--set 'prometheus.metrics.serviceMonitor.enabled=true'
```
Instead of passing all parameters via the *set* flag, it is also possible to define them as part of the `values.yaml`. Instead of passing all parameters via the *set* flag, it is also possible to define them as part of the `values.yaml`.
The following command downloads the `values.yaml` for a specific version of this chart. Please keep in mind, that the The following command downloads the `values.yaml` for a specific version of this chart. Please keep in mind, that the
version of the chart must be in sync with the `values.yaml`. Newer *minor* versions can have new features. New *major* version of the chart must be in sync with the `values.yaml`. Newer *minor* versions can have new features. New *major*
versions can break something! versions can break something!
```bash ```bash
CHART_VERSION=0.5.12 CHART_VERSION=0.5.4
helm show values --version "${CHART_VERSION}" prometheus-exporters/prometheus-postgres-exporter > values.yaml helm show values --version "${CHART_VERSION}" prometheus-exporters/prometheus-postgres-exporter > values.yaml
``` ```
@@ -102,7 +86,7 @@ Further information about this topic can be found in one of Kanishk's blog
> Please take care the a CPU limit < `1000m` can also lead to CPU throttling. Please read the linked documentation carefully. > Please take care the a CPU limit < `1000m` can also lead to CPU throttling. Please read the linked documentation carefully.
```bash ```bash
CHART_VERSION=0.5.12 CHART_VERSION=0.5.4
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \ helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
--set 'config.database.secret.databaseUsername=postgres' \ --set 'config.database.secret.databaseUsername=postgres' \
--set 'config.database.secret.databasePassword=postgres' \ --set 'config.database.secret.databasePassword=postgres' \
@@ -116,7 +100,7 @@ helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheu
#### TLS authentication and encryption #### TLS authentication and encryption
The example shows how to deploy the metric exporter with TLS encryption. The verification of the custom TLS The first example shows how to deploy the metric exporter with TLS encryption. The verification of the custom TLS
certification will be skipped by Prometheus. certification will be skipped by Prometheus.
> [!WARNING] > [!WARNING]
@@ -124,7 +108,7 @@ certification will be skipped by Prometheus.
> `tls.key` and `tls.crt` of the secret can be mounted into the container filesystem for TLS authentication / encryption. > `tls.key` and `tls.crt` of the secret can be mounted into the container filesystem for TLS authentication / encryption.
```bash ```bash
CHART_VERSION=0.5.12 CHART_VERSION=0.5.4
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \ helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
--set 'config.database.secret.databaseUsername=postgres' \ --set 'config.database.secret.databaseUsername=postgres' \
--set 'config.database.secret.databasePassword=postgres' \ --set 'config.database.secret.databasePassword=postgres' \
@@ -148,7 +132,7 @@ certificate for the metrics exporter - TLS certificate verification can be enabl
replaced: replaced:
```diff ```diff
CHART_VERSION=0.5.12 CHART_VERSION=0.5.4
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \ helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
--set 'config.database.secret.databaseUsername=postgres' \ --set 'config.database.secret.databaseUsername=postgres' \
--set 'config.database.secret.databasePassword=postgres' \ --set 'config.database.secret.databasePassword=postgres' \
@@ -179,13 +163,18 @@ TLS certificates before expiring.
Until the exporter does not support rotating TLS certificate a workaround can be applied. For example stakater's Until the exporter does not support rotating TLS certificate a workaround can be applied. For example stakater's
[reloader](https://github.com/stakater/Reloader) controller can be used to trigger a rolling update. The following [reloader](https://github.com/stakater/Reloader) controller can be used to trigger a rolling update. The following
annotation must be added to instruct the reloader controller to trigger a rolling update, when the mounted secret has annotation must be added to instruct the reloader controller to trigger a rolling update, when the mounted configMaps
been changed. and secrets have been changed.
> [!IMPORTANT] ```yaml
> The Helm chart already adds annotations to trigger a rolling release. Helm describes this approach under deployment:
> [Automatically Roll Deployments](https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments). annotations:
> For this reason, **only external** configMaps or secrets need to be monitored by reloader. reloader.stakater.com/auto: "true"
```
Instead of triggering a rolling update for configMap and secret resources, this action can also be defined for
individual items. For example, when the secret named `prometheus-postgresql-exporter-http` is mounted and the reloader
controller should only listen for changes of this secret:
```yaml ```yaml
deployment: deployment:
@@ -202,7 +191,7 @@ the Grafana container file system so that it is subsequently available to the us
makes this possible. makes this possible.
```bash ```bash
CHART_VERSION=0.5.12 CHART_VERSION=0.5.4
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \ helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
--set 'config.database.secret.databaseUsername=postgres' \ --set 'config.database.secret.databaseUsername=postgres' \
--set 'config.database.secret.databasePassword=postgres' \ --set 'config.database.secret.databasePassword=postgres' \
@@ -304,35 +293,6 @@ networkPolicies:
protocol: TCP protocol: TCP
``` ```
## ArgoCD
### Daily execution of rolling updates
The behavior whereby ArgoCD triggers a rolling update even though nothing appears to have changed often occurs in
connection with the helm concept `checksum/secret`, `checksum/configmap` or more generally, [Automatically Roll
Deployments](https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments).
The problem with combining this concept with ArgoCD is that ArgoCD re-renders the Helm chart every time. Even if the
content of the config map or secret has not changed, there may be minimal differences (e.g., whitespace, chart version,
Helm render order, different timestamps).
This changes the SHA256 hash, Argo sees a drift and trigger a rolling update of the deployment. Among other things, this
can lead to unnecessary notifications from ArgoCD.
To avoid this, the annotation with the shasum must be ignored. Below is a diff that adds the `Application` to ignore all
annotations with the prefix `checksum`.
```diff
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
+ ignoreDifferences:
+ - group: apps/v1
+ kind: Deployment
+ jqPathExpressions:
+ - '.spec.template.metadata.annotations | with_entries(select(.key | startswith("checksum")))'
```
## Parameters ## Parameters
### Global ### Global
-1
View File
@@ -1 +0,0 @@
repositoryID: d4d5f778-e029-4401-81a3-29a0f689ee08
+561 -197
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -16,6 +16,6 @@
"devDependencies": { "devDependencies": {
"@bitnami/readme-generator-for-helm": "^2.5.0", "@bitnami/readme-generator-for-helm": "^2.5.0",
"markdown-link-check": "^3.13.6", "markdown-link-check": "^3.13.6",
"markdownlint-cli": "^0.48.0" "markdownlint-cli": "^0.45.0"
} }
} }
+1 -2
View File
@@ -4,7 +4,6 @@
"local>volker.raschek/renovate-config:default#master", "local>volker.raschek/renovate-config:default#master",
"local>volker.raschek/renovate-config:container#master", "local>volker.raschek/renovate-config:container#master",
"local>volker.raschek/renovate-config:actions#master", "local>volker.raschek/renovate-config:actions#master",
"local>volker.raschek/renovate-config:helm#master",
"local>volker.raschek/renovate-config:npm#master", "local>volker.raschek/renovate-config:npm#master",
"local>volker.raschek/renovate-config:regexp#master" "local>volker.raschek/renovate-config:regexp#master"
], ],
@@ -36,7 +35,7 @@
], ],
"packageRules": [ "packageRules": [
{ {
"groupName": "Update docker.io/library/node", "groupname": "Update Node.JS",
"matchDepNames": [ "matchDepNames": [
"docker.io/library/node", "docker.io/library/node",
"library/node" "library/node"