Compare commits
261
Commits
0.5.2
..
be8065d8dc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be8065d8dc
|
||
|
|
e0e35b3e83 | ||
|
|
c834c0b905
|
||
|
|
d88c6973a2 | ||
|
|
571dc04f8f
|
||
|
|
60eb47751f | ||
|
|
7bf3b8c0bf
|
||
|
|
000a526d37 | ||
|
|
9901bdcb85
|
||
|
|
97154657ee | ||
|
|
1accfda479
|
||
|
|
0e52e7c40a | ||
|
|
48c255365e
|
||
|
|
b13b140119 | ||
|
|
dad6016aa4
|
||
|
|
719b19f219 | ||
|
|
773a7b558e | ||
|
|
816198ce09
|
||
|
|
4ec2093230
|
||
|
|
2c69e07e76 | ||
|
|
5f426c5f69
|
||
|
|
5ce13c9d68 | ||
|
|
68907c93b1
|
||
|
|
2f68ebf1dc | ||
|
|
ab9b13e5b6
|
||
|
|
6479b6b127 | ||
|
|
f3fe34297d
|
||
|
|
899798e50f | ||
|
|
7276e45858
|
||
|
|
479969e767
|
||
|
|
f6244fe964 | ||
|
|
783d262972
|
||
|
|
91c88f25ea | ||
|
|
f10f1a07cc
|
||
|
|
bcd3d3c420 | ||
|
|
3bdae9c0f0
|
||
|
|
d52d898d12 | ||
|
|
c9b0587ea9
|
||
|
|
54eabe8f58 | ||
|
|
7975de33ec
|
||
|
|
4522fb9b69 | ||
|
|
1a3122f249
|
||
|
|
1605c1fec8 | ||
|
|
91276009d5 | ||
|
|
2813c7a0d2
|
||
|
|
e422b63bdd
|
||
|
|
63b7f3c29f | ||
|
|
4af68bd169
|
||
|
|
c789fd4199 | ||
|
|
edf4e63225
|
||
|
|
f8eda8c95a | ||
|
|
d54f5917c2
|
||
|
|
42313e9054 | ||
|
|
9ef5acc1c8
|
||
|
|
ead61a050f | ||
|
|
d00ff01efc
|
||
|
|
4a05f0865d | ||
|
|
8c79ee432a
|
||
|
|
3be2d1fdf6 | ||
|
|
3111d90306
|
||
|
|
b55ec9b3e4 | ||
|
|
36717508b9
|
||
|
|
65f4671106
|
||
|
|
b1e6b03b16 | ||
|
|
b84297510b
|
||
|
|
68473be922
|
||
|
|
ee2bdc36c3
|
||
|
|
854e710a8d
|
||
|
|
e5080692f0 | ||
|
|
80588aa282 | ||
|
|
34989671a1
|
||
|
|
98ba315ab6
|
||
|
|
0371e256ed | ||
|
|
bc8f30b03b
|
||
|
|
bbdba0d422 | ||
|
|
0bce1142e5
|
||
|
|
db0900ed11 | ||
|
|
99f42f6b92
|
||
|
|
7c54e3f064
|
||
|
|
b23e3bda39
|
||
|
|
950c3377c1
|
||
|
|
9431c03768 | ||
|
|
3cb5f0ff4b
|
||
|
|
16fc04383d
|
||
|
|
38e667d6dd
|
||
|
|
5e24c3441e
|
||
|
|
091cb11776
|
||
|
|
b0ea947cec
|
||
|
|
43d662633d
|
||
|
|
b79d123578 | ||
|
|
225b1fdcd6
|
||
|
|
ce2c4845cd | ||
|
|
4494b791ad
|
||
|
|
1c7405d3ff | ||
|
|
c005e8e85a | ||
|
|
192fee8ad1 | ||
|
|
a8352d49a2
|
||
|
|
7ec8818251 | ||
|
|
78eddb620b
|
||
|
|
69f1f21cc4 | ||
|
|
d2c55a47cc | ||
|
|
ca601f58ce | ||
|
|
a134e73b2d
|
||
|
|
546c88b00c
|
||
|
|
51eed9551e
|
||
|
|
d78cd3b588 | ||
|
|
6ed084068f
|
||
|
|
e47e0bca53 | ||
|
|
32aad62e1d
|
||
|
|
5d64ff0b74 | ||
|
|
819a618c92
|
||
|
|
74bb5d640f | ||
|
|
d4fdbdc0c0
|
||
|
|
06a7fa1800 | ||
|
|
c1633833b4
|
||
|
|
ad6eaca5cd | ||
|
|
2c0de2c182
|
||
|
|
1656466bbe | ||
|
|
56379bd8b4
|
||
|
|
42d220e91c | ||
|
|
8daa6587a2
|
||
|
|
b6cc99d7b4
|
||
|
|
5cd92b6328
|
||
|
|
c9b96f3f13 | ||
|
|
5abe12ebdd
|
||
|
|
991d7d8138
|
||
|
|
5265389f5b
|
||
|
|
93b652bb15
|
||
|
|
9ff09361eb | ||
|
|
1aa3b86ecc
|
||
|
|
cb73c168f7 | ||
|
|
da43196b18 | ||
|
|
a8dab251b5
|
||
|
|
4936091445
|
||
|
|
c6fe40e32d
|
||
|
|
2a396c1993
|
||
|
|
af9a2e7f2d
|
||
|
|
d65c48b880
|
||
|
|
bec440645b
|
||
|
|
873b7d9a5e
|
||
|
|
96c6b03827 | ||
|
|
89f7ae973c
|
||
|
|
166ecce210 | ||
|
|
814d2ef609
|
||
|
|
b752824ebb | ||
|
|
d3a1b0f2b2
|
||
|
|
944d7ae72b | ||
|
|
04213233a6
|
||
|
|
6e4bf9c2f1 | ||
|
|
0db2f82524
|
||
|
|
f30ffa3054 | ||
|
|
1871edd53f
|
||
|
|
654b6c400d | ||
|
|
a4bab39b93
|
||
|
|
4fc6c58575
|
||
|
|
23931df4e2 | ||
|
|
0f427bc5b2 | ||
|
|
42c3ef84a4 | ||
|
|
8fa979a093 | ||
|
|
970581cc3d | ||
|
|
f34adfad97
|
||
|
|
90cbc57fee
|
||
|
|
d809667060
|
||
|
|
b1aa192fac
|
||
|
|
23543bb913
|
||
|
|
ea979d746f | ||
|
|
718e34749c
|
||
|
|
6851b0b9a5 | ||
|
|
e9caa4df02
|
||
|
|
4997fe998e | ||
|
|
d70de74355 | ||
|
|
fbced2f1e8
|
||
|
|
2594218173
|
||
|
|
fe8a32e605 | ||
|
|
11680e0cad
|
||
|
|
7165a32989 | ||
|
|
e860a54d92
|
||
|
|
f72e7328db | ||
|
|
035195c35d
|
||
|
|
847097c8ff | ||
|
|
25ea6e68eb
|
||
|
|
0f5ae6717f | ||
|
|
0d37fd8cfd
|
||
|
|
84b76cd381 | ||
|
|
679f2f916c
|
||
|
|
2b74827332
|
||
|
|
0674569892
|
||
|
|
b744ee15a6 | ||
|
|
1adef6e93b
|
||
|
|
0dbb71c60b
|
||
|
|
27f16e7b25 | ||
|
|
f5e0192f11
|
||
|
|
654920be33 | ||
|
|
e860cfafac
|
||
|
|
4522979444 | ||
|
|
598b9aba58
|
||
|
|
b4b0a4729e
|
||
|
|
b07a2f79a4
|
||
|
|
d77fe9866e | ||
|
|
e4c065d7e0
|
||
|
|
395407a398 | ||
|
|
2a22faff0d | ||
|
|
a93403c97f
|
||
|
|
177307f228
|
||
|
|
e70e7785a7 | ||
|
|
18ae53edef
|
||
|
|
a773bea18f | ||
|
|
bf5ddf5404
|
||
|
|
c30947c2e0 | ||
|
|
3e8e43562a | ||
|
|
a21a4e1c88
|
||
|
|
3289aeba32
|
||
|
|
c97b1d15f6
|
||
|
|
3af39e8ef5 | ||
|
|
ac2dca69bf
|
||
|
|
902be3a9aa
|
||
|
|
7f7972d570 | ||
|
|
c6b2748556 | ||
|
|
4f8ff6ee76
|
||
|
|
99e3a3053e
|
||
|
|
670233397e | ||
|
|
f8bf338d8b | ||
|
|
ad18974807
|
||
|
|
1ade590485
|
||
|
|
c6c0b7f92c | ||
|
|
30c1da211e | ||
|
|
674f8004d6
|
||
|
|
94c2e05d2a
|
||
|
|
de3562bb18 | ||
|
|
ada81c050a | ||
|
|
0d82de2e3b
|
||
|
|
54b64a7854
|
||
|
|
1254320443 | ||
|
|
a5bc7a1287
|
||
|
|
95ef4db607 | ||
|
|
8ee8078a54 | ||
|
|
7d62a9cc15
|
||
|
|
5f2273bfd1
|
||
|
|
a285c66ce9 | ||
|
|
699ff80a36
|
||
|
|
e84a57456a
|
||
|
|
3c8a92fb04
|
||
|
|
c4b9990c2d
|
||
|
|
4a03723386
|
||
|
|
62f0815a3b
|
||
|
|
c669330a80
|
||
|
|
f05dd2d8bf
|
||
|
|
c8ee5ce6be
|
||
|
|
fc5f3c03da
|
||
|
|
add1ff75a7
|
||
|
|
63f409ecdb
|
||
|
|
07653e9933
|
||
|
|
60efba2603
|
||
|
|
e9053be636
|
||
|
|
0001791071 | ||
|
|
c1529d6833
|
||
|
|
b7c5764e1b
|
||
|
|
e0dfced491
|
||
|
|
9c89db23f3
|
||
|
|
cf5e67b252
|
||
|
|
70e0e5110f
|
No files matched your search
@@ -1,61 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -e -o pipefail
|
||||
|
||||
CHART_FILE="Chart.yaml"
|
||||
if [ ! -f "${CHART_FILE}" ]; then
|
||||
echo "ERROR: ${CHART_FILE} not found!" 1>&2
|
||||
chart_file="Chart.yaml"
|
||||
if [ ! -f "${chart_file}" ]; then
|
||||
echo "ERROR: ${chart_file} not found!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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_new_tag="$(git tag --sort=-version:refname | head -n 1)"
|
||||
default_old_tag="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)"
|
||||
|
||||
if [ -z "${1}" ]; then
|
||||
read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
|
||||
if [ -z "${OLD_TAG}" ]; then
|
||||
OLD_TAG="${DEFAULT_OLD_TAG}"
|
||||
echo "Enter start tag [${default_old_tag}]:"
|
||||
read -r old_tag
|
||||
if [ -z "${old_tag}" ]; then
|
||||
old_tag="${default_old_tag}"
|
||||
fi
|
||||
|
||||
while [ -z "$(git tag --list "${OLD_TAG}")" ]; do
|
||||
echo "ERROR: Tag '${OLD_TAG}' not found!" 1>&2
|
||||
read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
|
||||
if [ -z "${OLD_TAG}" ]; then
|
||||
OLD_TAG="${DEFAULT_OLD_TAG}"
|
||||
while [ -z "$(git tag --list "${old_tag}")" ]; do
|
||||
echo "ERROR: Tag '${old_tag}' not found!" 1>&2
|
||||
echo "Enter start tag [${default_old_tag}]:"
|
||||
read -r old_tag
|
||||
if [ -z "${old_tag}" ]; then
|
||||
old_tag="${default_old_tag}"
|
||||
fi
|
||||
done
|
||||
else
|
||||
OLD_TAG=${1}
|
||||
if [ -z "$(git tag --list "${OLD_TAG}")" ]; then
|
||||
echo "ERROR: Tag '${OLD_TAG}' not found!" 1>&2
|
||||
old_tag=${1}
|
||||
if [ -z "$(git tag --list "${old_tag}")" ]; then
|
||||
echo "ERROR: Tag '${old_tag}' not found!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${2}" ]; then
|
||||
read -p "Enter end tag [${DEFAULT_NEW_TAG}]: " NEW_TAG
|
||||
if [ -z "${NEW_TAG}" ]; then
|
||||
NEW_TAG="${DEFAULT_NEW_TAG}"
|
||||
echo "Enter end tag [${default_new_tag}]:"
|
||||
read -r new_tag
|
||||
if [ -z "${new_tag}" ]; then
|
||||
new_tag="${default_new_tag}"
|
||||
fi
|
||||
|
||||
while [ -z "$(git tag --list "${NEW_TAG}")" ]; do
|
||||
echo "ERROR: Tag '${NEW_TAG}' not found!" 1>&2
|
||||
read -p "Enter end tag [${DEFAULT_NEW_TAG}]: " NEW_TAG
|
||||
if [ -z "${NEW_TAG}" ]; then
|
||||
NEW_TAG="${DEFAULT_NEW_TAG}"
|
||||
while [ -z "$(git tag --list "${new_tag}")" ]; do
|
||||
echo "ERROR: Tag '${new_tag}' not found!" 1>&2
|
||||
echo "Enter end tag [${default_new_tag}]:"
|
||||
read -r new_tag
|
||||
if [ -z "${new_tag}" ]; then
|
||||
new_tag="${default_new_tag}"
|
||||
fi
|
||||
done
|
||||
else
|
||||
NEW_TAG=${2}
|
||||
new_tag=${2}
|
||||
|
||||
if [ -z "$(git tag --list "${NEW_TAG}")" ]; then
|
||||
echo "ERROR: Tag '${NEW_TAG}' not found!" 1>&2
|
||||
if [ -z "$(git tag --list "${new_tag}")" ]; then
|
||||
echo "ERROR: Tag '${new_tag}' not found!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
CHANGE_LOG_YAML=$(mktemp)
|
||||
echo "[]" > "${CHANGE_LOG_YAML}"
|
||||
change_log_yaml=$(mktemp)
|
||||
echo "[]" > "${change_log_yaml}"
|
||||
|
||||
function map_type_to_kind() {
|
||||
case "${1}" in
|
||||
@@ -80,35 +84,42 @@ function map_type_to_kind() {
|
||||
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
|
||||
if [[ "${line}" =~ ^([a-zA-Z]+)(\([^\)]+\))?\:\ (.+)$ ]]; then
|
||||
TYPE="${BASH_REMATCH[1]}"
|
||||
KIND=$(map_type_to_kind "${TYPE}")
|
||||
type="${BASH_REMATCH[1]}"
|
||||
kind=$(map_type_to_kind "${type}")
|
||||
|
||||
if [ "${KIND}" == "skip" ]; then
|
||||
if [ "${kind}" == "skip" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
DESC="${BASH_REMATCH[3]}"
|
||||
desc="${BASH_REMATCH[3]}"
|
||||
|
||||
echo "- ${KIND}: ${DESC}"
|
||||
echo "- ${kind}: ${desc}"
|
||||
|
||||
jq --arg kind changed --arg description "$DESC" '. += [ $ARGS.named ]' < ${CHANGE_LOG_YAML} > ${CHANGE_LOG_YAML}.new
|
||||
mv ${CHANGE_LOG_YAML}.new ${CHANGE_LOG_YAML}
|
||||
jq --arg kind "${kind}" --arg description "${desc}" '. += [ $ARGS.named ]' < "${change_log_yaml}" > "${change_log_yaml}.new"
|
||||
mv "${change_log_yaml}.new" "${change_log_yaml}"
|
||||
|
||||
fi
|
||||
done <<< "${COMMIT_TITLES}"
|
||||
done <<< "${commit_titles}"
|
||||
|
||||
if [ -s "${CHANGE_LOG_YAML}" ]; then
|
||||
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}"
|
||||
if [ -s "${change_log_yaml}" ]; then
|
||||
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}"
|
||||
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
|
||||
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
|
||||
@@ -0,0 +1,41 @@
|
||||
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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||
with:
|
||||
registry: ${{ github.server_url }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||
- uses: oras-project/setup-oras@1d808f7d7f6995cc68b7bf507bfe5c5446e1dc9d # v2.0.1
|
||||
with:
|
||||
version: 1.3.3 # 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
|
||||
@@ -15,15 +15,14 @@ on:
|
||||
jobs:
|
||||
generate-parameters:
|
||||
container:
|
||||
image: docker.io/library/node:24.1.0-alpine
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
image: docker.io/library/node:26.7.0-alpine
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install tooling
|
||||
run: |
|
||||
apk update
|
||||
apk add git npm
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- name: Generate parameter section in README
|
||||
run: |
|
||||
npm install
|
||||
|
||||
+16
-21
@@ -12,31 +12,26 @@ on:
|
||||
|
||||
jobs:
|
||||
helm-lint:
|
||||
container:
|
||||
image: docker.io/volkerraschek/helm:3.18.2
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install tooling
|
||||
run: |
|
||||
apk update
|
||||
apk add git npm
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
||||
with:
|
||||
version: "v4.2.4" # renovate: datasource=github-tags depName=helm/helm
|
||||
- name: Lint helm files
|
||||
run: |
|
||||
helm lint --values values.yaml .
|
||||
|
||||
helm-unittest:
|
||||
container:
|
||||
image: docker.io/volkerraschek/helm:3.18.2
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install tooling
|
||||
run: |
|
||||
apk update
|
||||
apk add git npm
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- name: Unittest
|
||||
run: |
|
||||
helm unittest --strict --file 'unittests/**/*.yaml' ./
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
||||
with:
|
||||
version: "v4.2.4" # renovate: datasource=github-tags depName=helm/helm
|
||||
- env:
|
||||
HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
||||
name: Install helm-unittest
|
||||
run: helm plugin install --verify=false --version "${HELM_UNITTEST_VERSION}" https://github.com/helm-unittest/helm-unittest
|
||||
- name: Execute helm unittests
|
||||
run: helm unittest --strict --file 'unittests/**/*.yaml' .
|
||||
@@ -15,15 +15,14 @@ on:
|
||||
jobs:
|
||||
markdown-link-checker:
|
||||
container:
|
||||
image: docker.io/library/node:24.1.0-alpine
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
image: docker.io/library/node:26.7.0-alpine
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install tooling
|
||||
run: |
|
||||
apk update
|
||||
apk add git npm
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- name: Verify links in markdown files
|
||||
run: |
|
||||
npm install
|
||||
@@ -31,15 +30,14 @@ jobs:
|
||||
|
||||
markdown-lint:
|
||||
container:
|
||||
image: docker.io/library/node:24.1.0-alpine
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
image: docker.io/library/node:26.7.0-alpine
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install tooling
|
||||
run: |
|
||||
apk update
|
||||
apk add git
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- name: Lint markdown files
|
||||
run: |
|
||||
npm install
|
||||
|
||||
+126
-24
@@ -1,5 +1,10 @@
|
||||
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:
|
||||
push:
|
||||
tags:
|
||||
@@ -7,16 +12,60 @@ on:
|
||||
|
||||
jobs:
|
||||
publish-chart:
|
||||
container:
|
||||
image: docker.io/volkerraschek/helm:3.18.2
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install packages via apk
|
||||
run: |
|
||||
apk update
|
||||
apk add git npm jq yq
|
||||
- uses: volker-raschek/cosign-installer@7643eed6736a199595ed2a31e9979ec353a88adb # v4.1.3-rc3
|
||||
with:
|
||||
cosign-release: "v3.1.3" # renovate: datasource=github-tags depName=sigstore/cosign
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
||||
with:
|
||||
version: "v4.2.4" # 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.2" # renovate: datasource=github-tags depName=helm-unittest/helm-unittest extractVersion='^v(?<version>\d+\.\d+\.\d+)$'
|
||||
run: |
|
||||
helm plugin install --verify=false https://github.com/sigstore/helm-sigstore.git --version "${HELM_SIGSTORE_VERSION}" 1> /dev/null
|
||||
helm plugin install --verify=false https://github.com/losisin/helm-values-schema-json.git --version "${HELM_SCHEMA_VALUES_VERSION}" 1> /dev/null
|
||||
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
|
||||
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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -28,9 +77,10 @@ jobs:
|
||||
|
||||
- name: Extract meta information
|
||||
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 "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
|
||||
echo "REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut --delimiter '/' --fields 2 | sed --regexp-extended 's/-charts?//g')" >> $GITHUB_ENV
|
||||
echo "REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut --delimiter '/' --fields 1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Update Helm Chart version in README.md
|
||||
run: sed -i -E "s/^CHART_VERSION=.*/CHART_VERSION=${PACKAGE_VERSION}/g" README.md
|
||||
@@ -38,24 +88,76 @@ jobs:
|
||||
- name: Package chart
|
||||
run: |
|
||||
helm dependency build
|
||||
helm package --version "${PACKAGE_VERSION}" ./
|
||||
helm package \
|
||||
--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}" ./
|
||||
|
||||
- name: Upload Chart to ChartMuseum
|
||||
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||
with:
|
||||
registry: ${{ github.server_url }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Upload Chart to Gitea (OCI)
|
||||
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_REPOSITORY: ${{ vars.CHARTMUSEUM_REPOSITORY }}
|
||||
CHARTMUSEUM_USERNAME: ${{ secrets.CHARTMUSEUM_USERNAME }}
|
||||
CHARTMUSEUM_HOSTNAME: ${{ vars.CHARTMUSEUM_HOSTNAME }}
|
||||
run: |
|
||||
helm repo add --username ${CHARTMUSEUM_USERNAME} --password ${CHARTMUSEUM_PASSWORD} chartmuseum https://${CHARTMUSEUM_HOSTNAME}/${CHARTMUSEUM_REPOSITORY}
|
||||
helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz chartmuseum
|
||||
helm repo remove chartmuseum
|
||||
curl \
|
||||
--fail \
|
||||
--show-error \
|
||||
--request POST \
|
||||
--user "${CHARTMUSEUM_USERNAME}:${CHARTMUSEUM_PASSWORD}" \
|
||||
--upload-file "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz" \
|
||||
https://${CHARTMUSEUM_HOSTNAME}/api/${CHARTMUSEUM_REPOSITORY}/charts
|
||||
|
||||
- name: Upload Chart to Gitea
|
||||
env:
|
||||
GITEA_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||
GITEA_SERVER_URL: ${{ github.server_url }}
|
||||
run: |
|
||||
helm repo add --username ${REPOSITORY_OWNER} --password ${GITEA_PACKAGE_REGISTRY_TOKEN} gitea ${GITEA_SERVER_URL}/api/packages/${REPOSITORY_OWNER}/helm
|
||||
helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz gitea
|
||||
helm repo remove gitea
|
||||
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://${CHARTMUSEUM_HOSTNAME}/api/${CHARTMUSEUM_REPOSITORY}/prov
|
||||
fi
|
||||
@@ -1,4 +1,5 @@
|
||||
charts
|
||||
cosign*
|
||||
node_modules
|
||||
target
|
||||
values2.yml
|
||||
|
||||
@@ -136,7 +136,6 @@ MD044:
|
||||
- kube-prometheus-stack
|
||||
- Memcached
|
||||
- Oracle
|
||||
- ORBIS U
|
||||
- PostgreSQL
|
||||
- Prometheus
|
||||
- prometheus-exporter
|
||||
|
||||
Vendored
+4
-1
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"files.associations": {
|
||||
".gitea/workflows/*.yaml": "github-actions-workflow"
|
||||
},
|
||||
"yaml.schemas": {
|
||||
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/v0.5.2/schema/helm-testsuite.json": [
|
||||
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/v1.1.2/schema/helm-testsuite.json": [
|
||||
"/unittests/**/*.yaml"
|
||||
]
|
||||
},
|
||||
|
||||
+18
-14
@@ -1,24 +1,28 @@
|
||||
annotations:
|
||||
artifacthub.io/license: MIT
|
||||
artifacthub.io/links: |
|
||||
- name: Prometheus PostgreSQL exporter (binary)
|
||||
url: https://github.com/prometheus-community/postgres_exporter
|
||||
- name: support
|
||||
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
|
||||
name: prometheus-postgres-exporter
|
||||
appVersion: "0.20.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
|
||||
sources:
|
||||
- https://github.com/prometheus-community/postgres_exporter
|
||||
- https://git.cryptic.systems/volker.raschek/prometheus-postgres-exporter
|
||||
type: application
|
||||
version: "0.1.0"
|
||||
appVersion: "0.17.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
|
||||
@@ -4,13 +4,13 @@ CONTAINER_RUNTIME?=$(shell which podman)
|
||||
# HELM_IMAGE
|
||||
HELM_IMAGE_REGISTRY_HOST?=docker.io
|
||||
HELM_IMAGE_REPOSITORY?=volkerraschek/helm
|
||||
HELM_IMAGE_VERSION?=3.18.2 # renovate: datasource=docker registryUrl=https://docker.io depName=volkerraschek/helm
|
||||
HELM_IMAGE_VERSION?=4.2.3 # renovate: datasource=docker registryUrl=https://docker.io depName=volkerraschek/helm
|
||||
HELM_IMAGE_FULLY_QUALIFIED=${HELM_IMAGE_REGISTRY_HOST}/${HELM_IMAGE_REPOSITORY}:${HELM_IMAGE_VERSION}
|
||||
|
||||
# NODE_IMAGE
|
||||
NODE_IMAGE_REGISTRY_HOST?=docker.io
|
||||
NODE_IMAGE_REPOSITORY?=library/node
|
||||
NODE_IMAGE_VERSION?=24.1.0-alpine # renovate: datasource=docker registryUrl=https://docker.io depName=docker.io/library/node packageName=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_FULLY_QUALIFIED=${NODE_IMAGE_REGISTRY_HOST}/${NODE_IMAGE_REPOSITORY}:${NODE_IMAGE_VERSION}
|
||||
|
||||
# MISSING DOT
|
||||
|
||||
@@ -16,11 +16,15 @@ Chapter [configuration and installation](#helm-configuration-and-installation) d
|
||||
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
|
||||
helm chart is tested for deployment scenarios with **ArgoCD**.
|
||||
helm chart is tested for deployment scenarios with **ArgoCD**, but please keep in mind, that this chart supports the
|
||||
*[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
|
||||
|
||||
1. A helm chart repository must be configured, to pull the helm charts from.
|
||||
1. A helm chart repository must be configured, to pull the helm charts from. The helm charts can either be pulled 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
|
||||
`--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.
|
||||
@@ -33,7 +37,20 @@ helm chart is tested for deployment scenarios with **ArgoCD**.
|
||||
```bash
|
||||
helm repo add prometheus-exporters https://charts.cryptic.systems/prometheus-exporters
|
||||
helm repo update
|
||||
helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
CHART_VERSION=0.5.12
|
||||
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
--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'
|
||||
```
|
||||
|
||||
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"' \
|
||||
@@ -47,8 +64,8 @@ version of the chart must be in sync with the `values.yaml`. Newer *minor* versi
|
||||
versions can break something!
|
||||
|
||||
```bash
|
||||
CHART_VERSION=0.5.1
|
||||
helm show values prometheus-exporters/prometheus-postgres-exporter --version "${CHART_VERSION}" > values.yaml
|
||||
CHART_VERSION=0.5.12
|
||||
helm show values --version "${CHART_VERSION}" prometheus-exporters/prometheus-postgres-exporter > values.yaml
|
||||
```
|
||||
|
||||
A complete list of available helm chart versions can be displayed via the following command:
|
||||
@@ -85,7 +102,8 @@ 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.
|
||||
|
||||
```bash
|
||||
helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
CHART_VERSION=0.5.12
|
||||
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
--set 'config.database.secret.databaseUsername=postgres' \
|
||||
--set 'config.database.secret.databasePassword=postgres' \
|
||||
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
||||
@@ -98,7 +116,7 @@ helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgr
|
||||
|
||||
#### TLS authentication and encryption
|
||||
|
||||
The first example shows how to deploy the metric exporter with TLS encryption. The verification of the custom TLS
|
||||
The example shows how to deploy the metric exporter with TLS encryption. The verification of the custom TLS
|
||||
certification will be skipped by Prometheus.
|
||||
|
||||
> [!WARNING]
|
||||
@@ -106,7 +124,8 @@ 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.
|
||||
|
||||
```bash
|
||||
helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
CHART_VERSION=0.5.12
|
||||
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
--set 'config.database.secret.databaseUsername=postgres' \
|
||||
--set 'config.database.secret.databasePassword=postgres' \
|
||||
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
||||
@@ -129,7 +148,8 @@ certificate for the metrics exporter - TLS certificate verification can be enabl
|
||||
replaced:
|
||||
|
||||
```diff
|
||||
helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
CHART_VERSION=0.5.12
|
||||
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
--set 'config.database.secret.databaseUsername=postgres' \
|
||||
--set 'config.database.secret.databasePassword=postgres' \
|
||||
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
||||
@@ -150,6 +170,29 @@ replaced:
|
||||
+ --set 'prometheus.metrics.serviceMonitor.tlsConfig.keyFile=/etc/prometheus/tls/tls.key'
|
||||
```
|
||||
|
||||
#### TLS certificate rotation
|
||||
|
||||
If the exporter uses TLS certificates that are mounted as a secret in the container file system like the example
|
||||
[above](#tls-authentication-and-encryption), the exporter will not automatically apply them when the TLS certificates
|
||||
are rotated. Such a rotation can be for example triggered, when the [cert-manager](https://cert-manager.io/) issues new
|
||||
TLS certificates before expiring.
|
||||
|
||||
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
|
||||
annotation must be added to instruct the reloader controller to trigger a rolling update, when the mounted secret has
|
||||
been changed.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The Helm chart already adds annotations to trigger a rolling release. Helm describes this approach under
|
||||
> [Automatically Roll Deployments](https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments).
|
||||
> For this reason, **only external** configMaps or secrets need to be monitored by reloader.
|
||||
|
||||
```yaml
|
||||
deployment:
|
||||
annotations:
|
||||
secret.reloader.stakater.com/reload: "prometheus-postgresql-exporter-http"
|
||||
```
|
||||
|
||||
#### Grafana dashboard
|
||||
|
||||
The helm chart includes Grafana dashboards. These can be deployed as a configMap by activating Grafana integration. It
|
||||
@@ -159,7 +202,8 @@ the Grafana container file system so that it is subsequently available to the us
|
||||
makes this possible.
|
||||
|
||||
```bash
|
||||
helm install prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
CHART_VERSION=0.5.12
|
||||
helm install --version "${CHART_VERSION}" prometheus-postgres-exporter prometheus-exporters/prometheus-postgres-exporter \
|
||||
--set 'config.database.secret.databaseUsername=postgres' \
|
||||
--set 'config.database.secret.databasePassword=postgres' \
|
||||
--set 'config.database.secret.databaseConnectionUrl="postgres.example.local:5432/postgres?ssl=disable"' \
|
||||
@@ -260,6 +304,35 @@ networkPolicies:
|
||||
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
|
||||
|
||||
### Global
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
repositoryID: d4d5f778-e029-4401-81a3-29a0f689ee08
|
||||
Generated
+396
-693
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -16,6 +16,6 @@
|
||||
"devDependencies": {
|
||||
"@bitnami/readme-generator-for-helm": "^2.5.0",
|
||||
"markdown-link-check": "^3.13.6",
|
||||
"markdownlint-cli": "^0.45.0"
|
||||
"markdownlint-cli": "^0.49.0"
|
||||
}
|
||||
}
|
||||
+11
-1
@@ -4,11 +4,13 @@
|
||||
"local>volker.raschek/renovate-config:default#master",
|
||||
"local>volker.raschek/renovate-config:container#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:regexp#master"
|
||||
],
|
||||
"customManagers": [
|
||||
{
|
||||
"customType": "regex",
|
||||
"fileMatch": [
|
||||
"^Chart\\.yaml$"
|
||||
],
|
||||
@@ -21,9 +23,10 @@
|
||||
"versioningTemplate": "semver"
|
||||
},
|
||||
{
|
||||
"customType": "regex",
|
||||
"fileMatch": ["^README\\.md$"],
|
||||
"matchStrings": [
|
||||
"VERSION=(?<currentValue>.*)"
|
||||
"CHART_VERSION=(?<currentValue>.*)"
|
||||
],
|
||||
"depNameTemplate": "volker.raschek/prometheus-postgres-exporter",
|
||||
"packageNameTemplate": "https://git.cryptic.systems/volker.raschek/prometheus-postgres-exporter",
|
||||
@@ -32,6 +35,13 @@
|
||||
}
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"groupName": "Update docker.io/library/node",
|
||||
"matchDepNames": [
|
||||
"docker.io/library/node",
|
||||
"library/node"
|
||||
]
|
||||
},
|
||||
{
|
||||
"addLabels": [
|
||||
"renovate/automerge",
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -16,7 +16,7 @@
|
||||
{{- $secret := default (dict "data" (dict)) (lookup "v1" "Secret" .Release.Namespace .Values.config.database.existingSecret.secretName ) }}
|
||||
checksum/secret-database: {{ print $secret.spec | sha256sum }}
|
||||
{{- else }}
|
||||
checksum/secret-database: {{ include (print $.Template.BasePath "/prometheus-postgres-exporter/secretDatabase.yaml") . | sha256sum }}
|
||||
checksum/secret-database: {{ include (print $.Template.BasePath "/secretDatabase.yaml") . | sha256sum }}
|
||||
{{- end }}
|
||||
|
||||
{{/* exporter config */}}
|
||||
@@ -24,7 +24,7 @@ checksum/secret-database: {{ include (print $.Template.BasePath "/prometheus-pos
|
||||
{{- $secret := default (dict "data" (dict)) (lookup "v1" "Secret" .Release.Namespace .Values.config.exporterConfig.existingSecret.secretName ) }}
|
||||
checksum/secret-exporter-config: {{ print $secret.spec | sha256sum }}
|
||||
{{- else }}
|
||||
checksum/secret-exporter-config: {{ include (print $.Template.BasePath "/prometheus-postgres-exporter/secretExporterConfig.yaml") . | sha256sum }}
|
||||
checksum/secret-exporter-config: {{ include (print $.Template.BasePath "/secretExporterConfig.yaml") . | sha256sum }}
|
||||
{{- end }}
|
||||
|
||||
{{/* web config */}}
|
||||
@@ -32,7 +32,7 @@ checksum/secret-exporter-config: {{ include (print $.Template.BasePath "/prometh
|
||||
{{- $secret := default (dict "data" (dict)) (lookup "v1" "Secret" .Release.Namespace .Values.config.webConfig.existingSecret.secretName ) }}
|
||||
checksum/secret-web-config: {{ print $secret.spec | sha256sum }}
|
||||
{{- else }}
|
||||
checksum/secret-web-config: {{ include (print $.Template.BasePath "/prometheus-postgres-exporter/secretWebConfig.yaml") . | sha256sum }}
|
||||
checksum/secret-web-config: {{ include (print $.Template.BasePath "/secretWebConfig.yaml") . | sha256sum }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/configMapGrafanaDashboardPostgresExporter.yaml
|
||||
- templates/configMapGrafanaDashboardPostgresExporter.yaml
|
||||
tests:
|
||||
- it: Rendering postgresExporter
|
||||
asserts:
|
||||
|
||||
@@ -6,10 +6,10 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/deployment.yaml
|
||||
- templates/prometheus-postgres-exporter/secretDatabase.yaml
|
||||
- templates/prometheus-postgres-exporter/secretExporterConfig.yaml
|
||||
- templates/prometheus-postgres-exporter/secretWebConfig.yaml
|
||||
- templates/deployment.yaml
|
||||
- templates/secretDatabase.yaml
|
||||
- templates/secretExporterConfig.yaml
|
||||
- templates/secretWebConfig.yaml
|
||||
tests:
|
||||
- it: Rendering default
|
||||
set:
|
||||
@@ -20,16 +20,16 @@ tests:
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- containsDocument:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: metadata.annotations
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
@@ -38,20 +38,20 @@ tests:
|
||||
app.kubernetes.io/name: prometheus-postgres-exporter
|
||||
app.kubernetes.io/version: 0.1.0
|
||||
helm.sh/chart: prometheus-postgres-exporter-0.1.0
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 1
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- exists:
|
||||
path: spec.template.metadata.annotations.checksum/secret-database
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- exists:
|
||||
path: spec.template.metadata.annotations.checksum/secret-exporter-config
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- exists:
|
||||
path: spec.template.metadata.annotations.checksum/secret-web-config
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.metadata.labels
|
||||
value:
|
||||
@@ -60,29 +60,29 @@ tests:
|
||||
app.kubernetes.io/name: prometheus-postgres-exporter
|
||||
app.kubernetes.io/version: 0.1.0
|
||||
helm.sh/chart: prometheus-postgres-exporter-0.1.0
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.affinity
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].envFrom
|
||||
content:
|
||||
secretRef:
|
||||
name: prometheus-postgres-exporter-unittest-database-env
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].args
|
||||
value:
|
||||
- --config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml
|
||||
- --web.config.file=/etc/prometheus-postgres-exporter/config.d/webConfig.yaml
|
||||
- --web.listen-address=:9187
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].volumeMounts
|
||||
value:
|
||||
- mountPath: /etc/prometheus-postgres-exporter/config.d
|
||||
name: config-d
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.volumes
|
||||
value:
|
||||
@@ -94,59 +94,59 @@ tests:
|
||||
name: prometheus-postgres-exporter-unittest-exporter-config
|
||||
- secret:
|
||||
name: prometheus-postgres-exporter-unittest-web-config
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].image
|
||||
value: quay.io/prometheuscommunity/postgres-exporter:v0.1.0
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].imagePullPolicy
|
||||
value: IfNotPresent
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.containers[0].resources
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.containers[0].securityContext
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.dnsConfig
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.dnsPolicy
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.hostname
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.hostNetwork
|
||||
value: false
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.imagePullSecrets
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.nodeSelector
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.priorityClassName
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.restartPolicy
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.subdomain
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.terminationGracePeriodSeconds
|
||||
value: 60
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.tolerations
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- notExists:
|
||||
path: spec.template.spec.topologySpreadConstraints
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.strategy
|
||||
value:
|
||||
@@ -154,7 +154,7 @@ tests:
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 1
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test custom replicas
|
||||
set:
|
||||
@@ -169,7 +169,7 @@ tests:
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 3
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test custom affinity
|
||||
set:
|
||||
@@ -202,7 +202,7 @@ tests:
|
||||
values:
|
||||
- antarctica-east1
|
||||
- antarctica-west1
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test additional arguments
|
||||
set:
|
||||
@@ -224,7 +224,7 @@ tests:
|
||||
- --web.listen-address=:9187
|
||||
- --foo=bar
|
||||
- --bar=foo
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test custom imageRegistry and imageRepository
|
||||
set:
|
||||
@@ -240,7 +240,7 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].image
|
||||
value: registry.example.local/path/special/prometheus-postgres-exporter:v0.1.0
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test custom imagePullPolicy
|
||||
set:
|
||||
@@ -255,7 +255,7 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].imagePullPolicy
|
||||
value: Always
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test config.database.existingSecret
|
||||
set:
|
||||
@@ -268,7 +268,7 @@ tests:
|
||||
content:
|
||||
secretRef:
|
||||
name: custom-database-secret
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test config.exporterConfig.existingSecret
|
||||
set:
|
||||
@@ -286,7 +286,7 @@ tests:
|
||||
value:
|
||||
- mountPath: /etc/prometheus-postgres-exporter/config.d
|
||||
name: config-d
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.volumes
|
||||
value:
|
||||
@@ -298,7 +298,7 @@ tests:
|
||||
name: exporter-config-secret
|
||||
- secret:
|
||||
name: prometheus-postgres-exporter-unittest-web-config
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test config.webConfig.existingSecret
|
||||
set:
|
||||
@@ -316,7 +316,7 @@ tests:
|
||||
value:
|
||||
- mountPath: /etc/prometheus-postgres-exporter/config.d
|
||||
name: config-d
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.volumes
|
||||
value:
|
||||
@@ -328,7 +328,7 @@ tests:
|
||||
name: prometheus-postgres-exporter-unittest-exporter-config
|
||||
- secret:
|
||||
name: web-config-secret
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test custom resource limits and requests
|
||||
set:
|
||||
@@ -354,7 +354,7 @@ tests:
|
||||
resourceFieldRef:
|
||||
divisor: "1"
|
||||
resource: limits.cpu
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].resources
|
||||
value:
|
||||
@@ -364,7 +364,7 @@ tests:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 100MB
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test custom securityContext
|
||||
set:
|
||||
@@ -397,7 +397,7 @@ tests:
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test dnsConfig
|
||||
set:
|
||||
@@ -418,7 +418,7 @@ tests:
|
||||
nameservers:
|
||||
- "8.8.8.8"
|
||||
- "8.8.4.4"
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test dnsPolicy
|
||||
set:
|
||||
@@ -433,7 +433,7 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.dnsPolicy
|
||||
value: ClusterFirst
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test hostNetwork, hostname, subdomain
|
||||
set:
|
||||
@@ -450,15 +450,15 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.hostNetwork
|
||||
value: true
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.hostname
|
||||
value: pg-exporter
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.subdomain
|
||||
value: exporters.internal
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test imagePullSecrets
|
||||
set:
|
||||
@@ -477,7 +477,7 @@ tests:
|
||||
value:
|
||||
- name: my-pull-secret
|
||||
- name: my-special-secret
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test nodeSelector
|
||||
set:
|
||||
@@ -494,7 +494,7 @@ tests:
|
||||
path: spec.template.spec.nodeSelector
|
||||
value:
|
||||
foo: bar
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test priorityClassName
|
||||
set:
|
||||
@@ -509,7 +509,7 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.priorityClassName
|
||||
value: my-priority
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test restartPolicy
|
||||
set:
|
||||
@@ -524,7 +524,7 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.restartPolicy
|
||||
value: Always
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test terminationGracePeriodSeconds
|
||||
set:
|
||||
@@ -539,7 +539,7 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.terminationGracePeriodSeconds
|
||||
value: 120
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test tolerations
|
||||
set:
|
||||
@@ -562,7 +562,7 @@ tests:
|
||||
operator: Equal
|
||||
value: postgres
|
||||
effect: NoSchedule
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test topologySpreadConstraints
|
||||
set:
|
||||
@@ -587,7 +587,7 @@ tests:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: prometheus-postgres-exporter
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Test additional volumeMounts and volumes
|
||||
set:
|
||||
@@ -612,7 +612,7 @@ tests:
|
||||
mountPath: /usr/lib/prometheus-postgres-exporter/data
|
||||
- name: config-d
|
||||
mountPath: /etc/prometheus-postgres-exporter/config.d
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
- equal:
|
||||
path: spec.template.spec.volumes
|
||||
value:
|
||||
@@ -627,4 +627,4 @@ tests:
|
||||
name: prometheus-postgres-exporter-unittest-exporter-config
|
||||
- secret:
|
||||
name: prometheus-postgres-exporter-unittest-web-config
|
||||
template: templates/prometheus-postgres-exporter/deployment.yaml
|
||||
template: templates/deployment.yaml
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/ingress.yaml
|
||||
- templates/ingress.yaml
|
||||
tests:
|
||||
- it: Skip ingress by default.
|
||||
asserts:
|
||||
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/networkPolicies.yaml
|
||||
- templates/networkPolicies.yaml
|
||||
tests:
|
||||
- it: Skip networkPolicies in general disabled.
|
||||
set:
|
||||
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/podMonitor.yaml
|
||||
- templates/podMonitor.yaml
|
||||
tests:
|
||||
- it: Skip podMonitor when metrics are disabled.
|
||||
set:
|
||||
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/secretDatabase.yaml
|
||||
- templates/secretDatabase.yaml
|
||||
tests:
|
||||
- it: Skip rendering by using existing secret.
|
||||
set:
|
||||
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/secretExporterConfig.yaml
|
||||
- templates/secretExporterConfig.yaml
|
||||
tests:
|
||||
- it: Skip rendering by using existing secret.
|
||||
set:
|
||||
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/secretWebConfig.yaml
|
||||
- templates/secretWebConfig.yaml
|
||||
tests:
|
||||
- it: Rendering default secret.
|
||||
asserts:
|
||||
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/serviceAccount.yaml
|
||||
- templates/serviceAccount.yaml
|
||||
tests:
|
||||
- it: Skip rendering.
|
||||
set:
|
||||
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/serviceMonitorHTTP.yaml
|
||||
- templates/serviceMonitorHTTP.yaml
|
||||
tests:
|
||||
- it: Skip serviceMonitor when service is disabled.
|
||||
set:
|
||||
|
||||
@@ -6,7 +6,7 @@ release:
|
||||
name: prometheus-postgres-exporter-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/prometheus-postgres-exporter/serviceHTTP.yaml
|
||||
- templates/serviceHTTP.yaml
|
||||
tests:
|
||||
- it: Skip service when disabled.
|
||||
set:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
## @section Global
|
||||
## @param nameOverride Individual release name suffix.
|
||||
## @param fullnameOverride Override the complete release name logic.
|
||||
|
||||
Reference in new issue
Block a user