Compare commits
183 Commits
gitea-acti
...
redis-repl
| Author | SHA1 | Date | |
|---|---|---|---|
| 96154b9be9 | |||
| 06a206e4b3 | |||
| e49f293690 | |||
| 98b01ba2a4 | |||
| fdc027a298 | |||
| 74577ae63d | |||
| 1e52cebbd3 | |||
| 5bc8c7286c | |||
| 7c8145f741 | |||
|
c2ef2a6e0b
|
|||
| 0fda9c9db4 | |||
| 0765ad2336 | |||
| fb667e69bd | |||
|
577d6d9288
|
|||
| 83f23d6f4a | |||
| ef6c469f6c | |||
| 28e6783d73 | |||
| f7b6037ffc | |||
|
3941d174a8
|
|||
| f693b7f16f | |||
| 1ac412eafe | |||
| 15458b55cb | |||
| 60288e9ab6 | |||
| b35dbccfd2 | |||
| c69733c6bb | |||
| 6a2dbcaf85 | |||
| 47799c0d0d | |||
| 4c0cb5fe18 | |||
| 857c53799a | |||
| 2f09ce9dc0 | |||
| 64d4c731c7 | |||
| 80a4a3fa39 | |||
| d9ce69b996 | |||
| 0767066fc5 | |||
| 749f62a791 | |||
| a429797e5e | |||
| 52078fa459 | |||
| ed0cf6155f | |||
| 965b3006e9 | |||
|
9b77893478
|
|||
| dfea3a92b1 | |||
|
803933f7c6
|
|||
| 7506af9663 | |||
|
7b35bd6005
|
|||
| 36a7ecb017 | |||
|
4ae815cb5c
|
|||
| 7e41a17ab6 | |||
| 9c62b02f02 | |||
| 529bb9cd1f | |||
| 7c0d740d51 | |||
| a440911a57 | |||
| 1923aa9eba | |||
|
57e80cb889
|
|||
| 7ca61d22a9 | |||
| 1f5bbe4536 | |||
| db7b019e7f | |||
| c1229130a9 | |||
| 2e4547d89f | |||
| ec1d4b6734 | |||
| 1849703994 | |||
| ed71bb33f3 | |||
| 9f784fd928 | |||
|
dd664b21b9
|
|||
|
b14a7cb43a
|
|||
|
fa58dfc323
|
|||
|
951950b3a0
|
|||
| 711e21eb42 | |||
| 59d266bddf | |||
|
3aa36a4686
|
|||
| 83c3614377 | |||
|
6310d16882
|
|||
| dd556ed042 | |||
| 3e45ada5ee | |||
| dfc1c004f7 | |||
|
e356a1f5e4
|
|||
| eeb862334c | |||
| 564ac85500 | |||
|
9022faf339
|
|||
| c23f9cbff6 | |||
|
5e347fb07b
|
|||
| e0774edd94 | |||
| 1df6be47bf | |||
| 0a18610132 | |||
|
e792f6ea77
|
|||
| e228822694 | |||
| 0469bfe6ff | |||
| 113188b039 | |||
| b16ac7209a | |||
|
dd7a5a352d
|
|||
| b6a0fd8661 | |||
| dc46ba5939 | |||
|
06b4b4c8d0
|
|||
|
b94ae7ef72
|
|||
| a9e669fd76 | |||
| 19bd111758 | |||
| e5ab5017b7 | |||
| 2d661bafa0 | |||
| 7901a085f5 | |||
| d403cc4066 | |||
| da4a2acd8a | |||
| ae3897832b | |||
| de2b30b476 | |||
| 58e380c9ea | |||
| 2dfa733e49 | |||
| 227c0db540 | |||
| e09e2ba56f | |||
| bf18a84ea2 | |||
| 01bcb37e45 | |||
| 8e2f1d13e7 | |||
| 01052fa169 | |||
| 049829d7ef | |||
| d8a21ebe6c | |||
|
8fa08ea571
|
|||
| a74dcf8d07 | |||
| f3d13ef30f | |||
|
a277a8459f
|
|||
|
5635efb0bf
|
|||
| cb9b22574a | |||
| 76aef8d563 | |||
| 0f00be34cc | |||
|
d51b0a0f05
|
|||
| d729a5b1b5 | |||
|
a3521256f4
|
|||
| 857918cdb6 | |||
|
b4c5b8ef62
|
|||
| 0c4a92f971 | |||
| a381849255 | |||
| 175dc6a382 | |||
| bf16bd9e46 | |||
|
1e376185ac
|
|||
| ff2d7cd5c6 | |||
| 81d33840bf | |||
| b5a367af6a | |||
|
2ed348b7db
|
|||
| 8d4a0f2ba2 | |||
| 88a1c15cec | |||
| 43df30e7c3 | |||
| 72da712906 | |||
| c7871ee4b6 | |||
| 3d6d0a1cfb | |||
| b46e63218d | |||
| d37c77f244 | |||
| 3a1a432005 | |||
| 77a3e4a926 | |||
| b88454612b | |||
|
57e5184bee
|
|||
| a789214d01 | |||
|
cbe22fc5e4
|
|||
| 617fcc0ef8 | |||
| b9727e4afc | |||
| e5c767b6c5 | |||
| f95dd80e3a | |||
|
a56d7a435c
|
|||
| 222a273671 | |||
| c4345f3e7b | |||
|
be5dee1fd8
|
|||
| 595f234afa | |||
| 6214d8a397 | |||
| 69ab6f82a0 | |||
| 376ea6ee88 | |||
| 1c9b2e93f4 | |||
| 83ef3d23cb | |||
| 8f2c262845 | |||
| 4f9ab170f4 | |||
|
ad5d06b065
|
|||
| 50cf277ecb | |||
| e4795f1041 | |||
| dc64cb498e | |||
| 9646667d75 | |||
| 1b68fcabf5 | |||
| d95b7ef6ac | |||
| 8f92b4b3ef | |||
| 2d04080009 | |||
| b63140e74f | |||
| e430d3fe32 | |||
| 8e748b7084 | |||
| f339e8698c | |||
| fbc9293355 | |||
| 2371aeb612 | |||
| 799340aa3b | |||
| 9da5f721c7 | |||
| aa919178a4 | |||
| 55e878d517 |
@@ -1,29 +1,50 @@
|
||||
name: lint-and-test-charts
|
||||
name: lint-and-test
|
||||
|
||||
on: pull_request
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'charts/**'
|
||||
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'charts/**'
|
||||
|
||||
env:
|
||||
BASE_BRANCH: "origin/${{ gitea.base_ref }}"
|
||||
|
||||
jobs:
|
||||
lint-test:
|
||||
runs-on: ubuntu-latest
|
||||
chart-testing:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
version: latest
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: v3.19.2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.13"
|
||||
check-latest: true
|
||||
python-version: '3.14'
|
||||
|
||||
- name: Set up Chart Testing
|
||||
uses: helm/chart-testing-action@v2.7.0
|
||||
with:
|
||||
yamale_version: "6.0.0"
|
||||
|
||||
- name: Run Chart Testing (list-changed)
|
||||
id: list-changed
|
||||
@@ -35,4 +56,171 @@ jobs:
|
||||
|
||||
- name: Run Chart Testing (lint)
|
||||
if: steps.list-changed.outputs.changed == 'true'
|
||||
run: ct lint --target-branch ${{ gitea.event.repository.default_branch }}
|
||||
run: ct lint --validate-maintainers=false --target-branch ${{ gitea.event.repository.default_branch }}
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Test Failure - Helm Charts'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Tests have failed for Helm Charts'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/helm-charts/actions?workflow=lint-test.yaml", "clear": true}]'
|
||||
image: true
|
||||
|
||||
lint-helm:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Branch Exists
|
||||
id: check-branch-exists
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: GuillaumeFalourd/branch-exists@v1.1
|
||||
with:
|
||||
branch: ${{ gitea.base_ref }}
|
||||
|
||||
- name: Report Branch Exists
|
||||
id: branch-exists
|
||||
if: github.event_name == 'push' || steps.check-branch-exists.outputs.exists == 'true' && github.event_name == 'pull_request'
|
||||
run: |
|
||||
if [ ${{ github.event_name == 'push' }} ]; then
|
||||
echo ">> Action is from a push event, will continue with linting"
|
||||
|
||||
else
|
||||
echo ">> Branch ${{ gitea.base_ref }} exists, will continue with linting"
|
||||
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "exists=true" >> $GITEA_OUTPUT
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
if: steps.branch-exists.outputs.exists == 'true'
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: v3
|
||||
|
||||
- name: Check Directories for Changes
|
||||
id: check-dir-changes
|
||||
if: steps.branch-exists.outputs.exists == 'true'
|
||||
run: |
|
||||
CHANGED_CHARTS=()
|
||||
|
||||
echo ">> Target branch for diff is: ${BASE_BRANCH}"
|
||||
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
echo ""
|
||||
echo ">> Checking for changes in a pull request ..."
|
||||
GIT_DIFF=$(git diff --name-only "${BASE_BRANCH}" | xargs -I {} dirname {} | sort -u | grep -E "charts/")
|
||||
else
|
||||
echo ""
|
||||
echo ">> Checking for changes from a push ..."
|
||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep -E "charts/")
|
||||
fi
|
||||
|
||||
if [ -n "${GIT_DIFF}" ]; then
|
||||
echo ""
|
||||
echo ">> Changes detected:"
|
||||
echo "$GIT_DIFF"
|
||||
|
||||
for path in $GIT_DIFF; do
|
||||
CHANGED_CHARTS+=$(echo "$path" | awk -F '/' '{print $2}')
|
||||
CHANGED_CHARTS+=$(echo " ")
|
||||
done
|
||||
|
||||
else
|
||||
echo ""
|
||||
echo ">> No changes detected"
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "${CHANGED_CHARTS}" ]; then
|
||||
echo ""
|
||||
echo ">> Chart to Lint:"
|
||||
echo "$(echo "${CHANGED_CHARTS}" | sort -u)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
echo "chart-dir<<EOF" >> $GITEA_OUTPUT
|
||||
echo "$(echo "${CHANGED_CHARTS}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "EOF" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Add Repositories
|
||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||
env:
|
||||
CHANGED_CHARTS: ${{ steps.check-dir-changes.outputs.chart-dir }}
|
||||
run: |
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
for dir in ${CHANGED_CHARTS}; do
|
||||
helm dependency list --max-col-width 120 charts/$dir 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
done
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ""
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Lint Helm Chart
|
||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||
env:
|
||||
CHANGED_CHARTS: ${{ steps.check-dir-changes.outputs.chart-dir }}
|
||||
run: |
|
||||
echo ">> Running linting on changed charts ..."
|
||||
|
||||
for dir in ${CHANGED_CHARTS}; do
|
||||
chart_path=charts/$dir
|
||||
chart_name=$(basename "$chart_path")
|
||||
|
||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||
cd $chart_path
|
||||
|
||||
echo ""
|
||||
echo ">> Building helm dependency ..."
|
||||
helm dependency build --skip-refresh
|
||||
|
||||
echo ""
|
||||
echo ">> Linting helm ..."
|
||||
helm lint --namespace "$chart_name"
|
||||
|
||||
else
|
||||
echo ""
|
||||
echo ">> Directory $chart_path does not contain a Chart.yaml. Skipping ..."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Test Failure - Helm Charts'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Tests have failed for Helm Charts'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/helm-charts/actions?workflow=lint-test.yaml", "clear": true}]'
|
||||
image: true
|
||||
|
||||
@@ -14,37 +14,80 @@ env:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: latest
|
||||
version: v3.19.2
|
||||
|
||||
- name: Add Repositories
|
||||
run: |
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
helm dependency list --max-col-width 120 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Package Helm Chart
|
||||
run: |
|
||||
cd $WORKFLOW_DIR
|
||||
helm dependency build
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Building helm dependency ..."
|
||||
helm dependency build --skip-refresh --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
|
||||
|
||||
- name: Publish Helm Chart to Harbor
|
||||
run: |
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }}
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts
|
||||
echo ">> Logging into Harbor ..."
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }} --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Publishing chart to Harbor ..."
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Publish Helm Chart to Gitea
|
||||
run: |
|
||||
helm plugin install https://github.com/chartmuseum/helm-push
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts
|
||||
echo ">> Installing Chart Museum plugin ..."
|
||||
helm plugin install https://github.com/chartmuseum/helm-push --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Adding Gitea repository ..."
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Pushing chart to gitea"
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts --debug
|
||||
|
||||
- name: Extract Chart Metadata
|
||||
run: |
|
||||
cd $WORKFLOW_DIR
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding Chart metadata to workflow ENV ..."
|
||||
echo ""
|
||||
echo ">> Chart Version: $(yq '.version' Chart.yaml)"
|
||||
echo ">> Chart Name: $(yq '.name' Chart.yaml)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
|
||||
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
|
||||
|
||||
@@ -56,11 +99,30 @@ jobs:
|
||||
files: |-
|
||||
${{ env.PACKAGE_PATH }}
|
||||
|
||||
- name: Actions Ntfy
|
||||
run: |
|
||||
curl \
|
||||
-H "Authorization: Bearer ${{ secrets.NTFY_CRED }}" \
|
||||
-H "Title: Chart Released: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}" \
|
||||
-H "Content-Type: text/plain" \
|
||||
-d $'Repo: ${{ gitea.repository }}\nCommit: ${{ gitea.sha }}\nRef: ${{ gitea.ref }}\nStatus: ${{ job.status}}' \
|
||||
${{ secrets.NTFY_URL }}
|
||||
- name: ntfy Success
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: success()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Success - ${{ env.CHART_NAME }}'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,successfully,completed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has been released!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Failure - ${{ env.CHART_NAME }}'
|
||||
priority: 4
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has failed to be released.'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/helm-charts/actions?workflow=release-charts-cloudflared.yml", "clear": true}]'
|
||||
image: true
|
||||
|
||||
@@ -14,37 +14,80 @@ env:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: latest
|
||||
version: v3.19.2
|
||||
|
||||
- name: Add Repositories
|
||||
run: |
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
helm dependency list --max-col-width 120 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Package Helm Chart
|
||||
run: |
|
||||
cd $WORKFLOW_DIR
|
||||
helm dependency build
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Building helm dependency ..."
|
||||
helm dependency build --skip-refresh --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
|
||||
|
||||
- name: Publish Helm Chart to Harbor
|
||||
run: |
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }}
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts
|
||||
echo ">> Logging into Harbor ..."
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }} --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Publishing chart to Harbor ..."
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Publish Helm Chart to Gitea
|
||||
run: |
|
||||
helm plugin install https://github.com/chartmuseum/helm-push
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts
|
||||
echo ">> Installing Chart Museum plugin ..."
|
||||
helm plugin install https://github.com/chartmuseum/helm-push --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Adding Gitea repository ..."
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Pushing chart to gitea"
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts --debug
|
||||
|
||||
- name: Extract Chart Metadata
|
||||
run: |
|
||||
cd $WORKFLOW_DIR
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding Chart metadata to workflow ENV ..."
|
||||
echo ""
|
||||
echo ">> Chart Version: $(yq '.version' Chart.yaml)"
|
||||
echo ">> Chart Name: $(yq '.name' Chart.yaml)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
|
||||
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
|
||||
|
||||
@@ -56,11 +99,30 @@ jobs:
|
||||
files: |-
|
||||
${{ env.PACKAGE_PATH }}
|
||||
|
||||
- name: Actions Ntfy
|
||||
run: |
|
||||
curl \
|
||||
-H "Authorization: Bearer ${{ secrets.NTFY_CRED }}" \
|
||||
-H "Title: Chart Released: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}" \
|
||||
-H "Content-Type: text/plain" \
|
||||
-d $'Repo: ${{ gitea.repository }}\nCommit: ${{ gitea.sha }}\nRef: ${{ gitea.ref }}\nStatus: ${{ job.status}}' \
|
||||
${{ secrets.NTFY_URL }}
|
||||
- name: ntfy Success
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: success()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Success - ${{ env.CHART_NAME }}'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,successfully,completed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has been released!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Failure - ${{ env.CHART_NAME }}'
|
||||
priority: 4
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has failed to be released.'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/helm-charts/actions?workflow=release-charts-generic-device-plugin.yml", "clear": true}]'
|
||||
image: true
|
||||
|
||||
@@ -14,37 +14,80 @@ env:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: latest
|
||||
version: v3.19.2
|
||||
|
||||
- name: Add Repositories
|
||||
run: |
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
helm dependency list --max-col-width 120 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Package Helm Chart
|
||||
run: |
|
||||
cd $WORKFLOW_DIR
|
||||
helm dependency build
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Building helm dependency ..."
|
||||
helm dependency build --skip-refresh --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
|
||||
|
||||
- name: Publish Helm Chart to Harbor
|
||||
run: |
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }}
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts
|
||||
echo ">> Logging into Harbor ..."
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }} --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Publishing chart to Harbor ..."
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Publish Helm Chart to Gitea
|
||||
run: |
|
||||
helm plugin install https://github.com/chartmuseum/helm-push
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts
|
||||
echo ">> Installing Chart Museum plugin ..."
|
||||
helm plugin install https://github.com/chartmuseum/helm-push --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Adding Gitea repository ..."
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Pushing chart to gitea"
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts --debug
|
||||
|
||||
- name: Extract Chart Metadata
|
||||
run: |
|
||||
cd $WORKFLOW_DIR
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding Chart metadata to workflow ENV ..."
|
||||
echo ""
|
||||
echo ">> Chart Version: $(yq '.version' Chart.yaml)"
|
||||
echo ">> Chart Name: $(yq '.name' Chart.yaml)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
|
||||
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
|
||||
|
||||
@@ -56,11 +99,30 @@ jobs:
|
||||
files: |-
|
||||
${{ env.PACKAGE_PATH }}
|
||||
|
||||
- name: Actions Ntfy
|
||||
run: |
|
||||
curl \
|
||||
-H "Authorization: Bearer ${{ secrets.NTFY_CRED }}" \
|
||||
-H "Title: Chart Released: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}" \
|
||||
-H "Content-Type: text/plain" \
|
||||
-d $'Repo: ${{ gitea.repository }}\nCommit: ${{ gitea.sha }}\nRef: ${{ gitea.ref }}\nStatus: ${{ job.status}}' \
|
||||
${{ secrets.NTFY_URL }}
|
||||
- name: ntfy Success
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: success()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Success - ${{ env.CHART_NAME }}'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,successfully,completed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has been released!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Failure - ${{ env.CHART_NAME }}'
|
||||
priority: 4
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has failed to be released.'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/helm-charts/actions?workflow=release-charts-gitea-actions.yml", "clear": true}]'
|
||||
image: true
|
||||
|
||||
@@ -14,37 +14,80 @@ env:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: latest
|
||||
version: v3.19.2
|
||||
|
||||
- name: Add Repositories
|
||||
run: |
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
helm dependency list --max-col-width 120 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Package Helm Chart
|
||||
run: |
|
||||
cd $WORKFLOW_DIR
|
||||
helm dependency build
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Building helm dependency ..."
|
||||
helm dependency build --skip-refresh --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
|
||||
|
||||
- name: Publish Helm Chart to Harbor
|
||||
run: |
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }}
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts
|
||||
echo ">> Logging into Harbor ..."
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }} --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Publishing chart to Harbor ..."
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Publish Helm Chart to Gitea
|
||||
run: |
|
||||
helm plugin install https://github.com/chartmuseum/helm-push
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts
|
||||
echo ">> Installing Chart Museum plugin ..."
|
||||
helm plugin install https://github.com/chartmuseum/helm-push --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Adding Gitea repository ..."
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Pushing chart to gitea"
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts --debug
|
||||
|
||||
- name: Extract Chart Metadata
|
||||
run: |
|
||||
cd $WORKFLOW_DIR
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding Chart metadata to workflow ENV ..."
|
||||
echo ""
|
||||
echo ">> Chart Version: $(yq '.version' Chart.yaml)"
|
||||
echo ">> Chart Name: $(yq '.name' Chart.yaml)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
|
||||
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
|
||||
|
||||
@@ -56,11 +99,30 @@ jobs:
|
||||
files: |-
|
||||
${{ env.PACKAGE_PATH }}
|
||||
|
||||
- name: Actions Ntfy
|
||||
run: |
|
||||
curl \
|
||||
-H "Authorization: Bearer ${{ secrets.NTFY_CRED }}" \
|
||||
-H "Title: Chart Released: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}" \
|
||||
-H "Content-Type: text/plain" \
|
||||
-d $'Repo: ${{ gitea.repository }}\nCommit: ${{ gitea.sha }}\nRef: ${{ gitea.ref }}\nStatus: ${{ job.status}}' \
|
||||
${{ secrets.NTFY_URL }}
|
||||
- name: ntfy Success
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: success()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Success - ${{ env.CHART_NAME }}'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,successfully,completed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has been released!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Failure - ${{ env.CHART_NAME }}'
|
||||
priority: 4
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has failed to be released.'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/helm-charts/actions?workflow=release-charts-postgres-cluster.yml", "clear": true}]'
|
||||
image: true
|
||||
|
||||
128
.gitea/workflows/release-charts-redis-replication.yml
Normal file
128
.gitea/workflows/release-charts-redis-replication.yml
Normal file
@@ -0,0 +1,128 @@
|
||||
name: release-charts-redis-replication
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "charts/redis-replication/**"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
WORKFLOW_DIR: "charts/redis-replication"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: v3.19.2
|
||||
|
||||
- name: Add Repositories
|
||||
run: |
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
helm dependency list --max-col-width 120 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Package Helm Chart
|
||||
run: |
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Building helm dependency ..."
|
||||
helm dependency build --skip-refresh --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
|
||||
|
||||
- name: Publish Helm Chart to Harbor
|
||||
run: |
|
||||
echo ">> Logging into Harbor ..."
|
||||
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }} --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Publishing chart to Harbor ..."
|
||||
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts --debug
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Publish Helm Chart to Gitea
|
||||
run: |
|
||||
echo ">> Installing Chart Museum plugin ..."
|
||||
helm plugin install https://github.com/chartmuseum/helm-push --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Adding Gitea repository ..."
|
||||
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm --debug
|
||||
|
||||
echo ""
|
||||
echo ">> Pushing chart to gitea"
|
||||
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts --debug
|
||||
|
||||
- name: Extract Chart Metadata
|
||||
run: |
|
||||
cd ${WORKFLOW_DIR}
|
||||
|
||||
echo ">> Adding Chart metadata to workflow ENV ..."
|
||||
echo ""
|
||||
echo ">> Chart Version: $(yq '.version' Chart.yaml)"
|
||||
echo ">> Chart Name: $(yq '.name' Chart.yaml)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
|
||||
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
|
||||
|
||||
- name: Release Helm Chart
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
|
||||
tag_name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
|
||||
files: |-
|
||||
${{ env.PACKAGE_PATH }}
|
||||
|
||||
- name: ntfy Success
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: success()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Success - ${{ env.CHART_NAME }}'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,successfully,completed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has been released!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Release Failure - ${{ env.CHART_NAME }}'
|
||||
priority: 4
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has failed to be released.'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/helm-charts/actions?workflow=release-charts-redis-replication.yml", "clear": true}]'
|
||||
image: true
|
||||
@@ -13,18 +13,20 @@ on:
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/renovatebot/renovate:40
|
||||
container: ghcr.io/renovatebot/renovate:42
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: renovate
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Renovate
|
||||
run: renovate
|
||||
env:
|
||||
RENOVATE_PLATFORM: gitea
|
||||
RENOVATE_AUTODISCOVER: true
|
||||
RENOVATE_ONBOARDING: true
|
||||
RENOVATE_ENDPOINT: http://gitea-http.gitea:3000
|
||||
RENOVATE_ENDPOINT: ${{ vars.INSTANCE_URL }}
|
||||
RENOVATE_REPOSITORIES: alexlebens/helm-charts
|
||||
RENOVATE_GIT_AUTHOR: Renovate Bot <renovate-bot@alexlebens.net>
|
||||
LOG_LEVEL: debug
|
||||
LOG_LEVEL: info
|
||||
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.RENOVATE_GIT_PRIVATE_KEY }}
|
||||
RENOVATE_GITHUB_COM_TOKEN: ${{ secrets.RENOVATE_GITHUB_COM_TOKEN }}
|
||||
RENOVATE_REDIS_URL: redis://gitea-renovate-valkey-primary.gitea:6379
|
||||
RENOVATE_REDIS_URL: ${{ vars.RENOVATE_REDIS_URL }}
|
||||
|
||||
12
.github/workflows/release-charts.yml
vendored
12
.github/workflows/release-charts.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -23,6 +23,16 @@ jobs:
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
|
||||
- name: Add Repositories
|
||||
run: |
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
for dir in $(ls -d charts/*/); do
|
||||
helm dependency list $dir --max-col-width 120 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
done
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@v1.7.0
|
||||
env:
|
||||
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,12 +1,2 @@
|
||||
# Archived
|
||||
charts/**/archive
|
||||
|
||||
# Compiled Helm chart dependencies
|
||||
charts/**/Chart.lock
|
||||
charts/**/charts/
|
||||
|
||||
# Testing
|
||||
__snapshot__/
|
||||
|
||||
# Docs
|
||||
_site/
|
||||
|
||||
6
charts/cloudflared/Chart.lock
Normal file
6
charts/cloudflared/Chart.lock
Normal file
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:cd050e107fbec6769024a6d316c3f43701295a55cddf53a9fc304b52ea879560
|
||||
generated: "2025-12-04T18:06:50.235715-06:00"
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: cloudflared
|
||||
version: 1.15.0
|
||||
version: 1.23.2
|
||||
description: Cloudflared Tunnel
|
||||
keywords:
|
||||
- cloudflare
|
||||
@@ -13,6 +13,6 @@ maintainers:
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.0.1
|
||||
version: 4.5.0
|
||||
icon: https://avatars.githubusercontent.com/u/314135?s=48&v=4
|
||||
appVersion: "2025.5.0"
|
||||
appVersion: "2025.11.1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# cloudflared
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
Cloudflared Tunnel
|
||||
|
||||
@@ -19,7 +19,7 @@ Cloudflared Tunnel
|
||||
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| https://bjw-s-labs.github.io/helm-charts/ | common | 4.0.1 |
|
||||
| https://bjw-s-labs.github.io/helm-charts/ | common | 4.5.0 |
|
||||
|
||||
## Values
|
||||
|
||||
@@ -27,7 +27,7 @@ Cloudflared Tunnel
|
||||
|-----|------|---------|-------------|
|
||||
| existingSecretKey | string | `"cf-tunnel-token"` | Name of key that contains the token in the existingSecret |
|
||||
| existingSecretName | string | `"cloudflared-secret"` | Name of existing secret that contains Cloudflare token |
|
||||
| image | object | `{"pullPolicy":"IfNotPresent","repository":"cloudflare/cloudflared","tag":"2025.5.0"}` | Default image |
|
||||
| image | object | `{"pullPolicy":"IfNotPresent","repository":"cloudflare/cloudflared","tag":"2025.11.1"}` | Default image |
|
||||
| name | string | `"cloudflared"` | Name override of release |
|
||||
| resources | object | `{"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources |
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ existingSecretKey: cf-tunnel-token
|
||||
# -- Default image
|
||||
image:
|
||||
repository: cloudflare/cloudflared
|
||||
tag: "2025.5.0"
|
||||
tag: "2025.11.1"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# -- Default resources
|
||||
|
||||
6
charts/generic-device-plugin/Chart.lock
Normal file
6
charts/generic-device-plugin/Chart.lock
Normal file
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:cd050e107fbec6769024a6d316c3f43701295a55cddf53a9fc304b52ea879560
|
||||
generated: "2025-12-04T18:08:17.823318-06:00"
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: generic-device-plugin
|
||||
version: 0.2.0
|
||||
version: 0.20.7
|
||||
description: Generic Device Plugin
|
||||
keywords:
|
||||
- generic-device-plugin
|
||||
@@ -14,5 +14,5 @@ maintainers:
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.0.1
|
||||
appVersion: 0.2.0
|
||||
version: 4.5.0
|
||||
appVersion: 0.20.4
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# generic-device-plugin
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
Generic Device Plugin
|
||||
|
||||
@@ -19,7 +19,7 @@ Generic Device Plugin
|
||||
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| https://bjw-s-labs.github.io/helm-charts/ | common | 4.0.1 |
|
||||
| https://bjw-s-labs.github.io/helm-charts/ | common | 4.5.0 |
|
||||
|
||||
## Values
|
||||
|
||||
@@ -27,10 +27,10 @@ Generic Device Plugin
|
||||
|-----|------|---------|-------------|
|
||||
| config | object | `{"data":"devices:\n - name: serial\n groups:\n - paths:\n - path: /dev/ttyUSB*\n - paths:\n - path: /dev/ttyACM*\n - paths:\n - path: /dev/tty.usb*\n - paths:\n - path: /dev/cu.*\n - paths:\n - path: /dev/cuaU*\n - paths:\n - path: /dev/rfcomm*\n - name: video\n groups:\n - paths:\n - path: /dev/video0\n - name: fuse\n groups:\n - count: 10\n paths:\n - path: /dev/fuse\n - name: audio\n groups:\n - count: 10\n paths:\n - path: /dev/snd\n - name: capture\n groups:\n - paths:\n - path: /dev/snd/controlC0\n - path: /dev/snd/pcmC0D0c\n - paths:\n - path: /dev/snd/controlC1\n mountPath: /dev/snd/controlC0\n - path: /dev/snd/pcmC1D0c\n mountPath: /dev/snd/pcmC0D0c\n - paths:\n - path: /dev/snd/controlC2\n mountPath: /dev/snd/controlC0\n - path: /dev/snd/pcmC2D0c\n mountPath: /dev/snd/pcmC0D0c\n - paths:\n - path: /dev/snd/controlC3\n mountPath: /dev/snd/controlC0\n - path: /dev/snd/pcmC3D0c\n mountPath: /dev/snd/pcmC0D0c\n","enabled":true}` | Config map |
|
||||
| config.data | string | See [values.yaml](./values.yaml) | generic-device-plugin config file [[ref]](https://github.com/squat/generic-device-plugin#usage) |
|
||||
| deviceDomain | string | `"squat.ai"` | Domain used by devices for identifcation |
|
||||
| image | object | `{"pullPolicy":"Always","repository":"ghcr.io/squat/generic-device-plugin","tag":"latest@sha256:d7d0951df7f11479185fd9fba1c1cb4d9c8f3232d38a5468d6fe80074f2b45d5"}` | Default image |
|
||||
| deviceDomain | string | `"devic.es"` | Domain used by devices for identifcation |
|
||||
| image | object | `{"pullPolicy":"Always","repository":"ghcr.io/squat/generic-device-plugin","tag":"latest@sha256:aa0571c7f461fb99747ada00f2de69eb856dcbbc0e87965fffe37a15f7bc006f"}` | Default image |
|
||||
| name | string | `"generic-device-plugin"` | Name override of release |
|
||||
| resources | object | `{"limit":{"cpu":"100m","memory":"20Mi"},"requests":{"cpu":"50m","memory":"10Mi"}}` | Default resources |
|
||||
| resources | object | `{"requests":{"cpu":"50m","memory":"10Mi"}}` | Default resources |
|
||||
| service | object | `{"listenPort":8080}` | Service port |
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
@@ -4,11 +4,11 @@ name: generic-device-plugin
|
||||
# -- Default image
|
||||
image:
|
||||
repository: ghcr.io/squat/generic-device-plugin
|
||||
tag: latest@sha256:d7d0951df7f11479185fd9fba1c1cb4d9c8f3232d38a5468d6fe80074f2b45d5
|
||||
tag: latest@sha256:aa0571c7f461fb99747ada00f2de69eb856dcbbc0e87965fffe37a15f7bc006f
|
||||
pullPolicy: Always
|
||||
|
||||
# -- Domain used by devices for identifcation
|
||||
deviceDomain: squat.ai
|
||||
deviceDomain: devic.es
|
||||
|
||||
# -- Service port
|
||||
service:
|
||||
@@ -16,9 +16,6 @@ service:
|
||||
|
||||
# -- Default resources
|
||||
resources:
|
||||
limit:
|
||||
cpu: 100m
|
||||
memory: 20Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 10Mi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: gitea-actions
|
||||
version: 0.1.0
|
||||
version: 0.2.1
|
||||
description: Gitea Actions
|
||||
keywords:
|
||||
- cicd
|
||||
@@ -12,4 +12,4 @@ sources:
|
||||
maintainers:
|
||||
- name: alexlebens
|
||||
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
|
||||
appVersion: 0.261.3
|
||||
appVersion: 0.2.11
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# gitea-actions
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
Gitea Actions
|
||||
|
||||
@@ -19,7 +19,7 @@ Gitea Actions
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| enabled | bool | `false` | |
|
||||
| enabled | bool | `true` | |
|
||||
| existingSecret | string | `""` | |
|
||||
| existingSecretKey | string | `""` | |
|
||||
| giteaRootURL | string | `""` | |
|
||||
@@ -27,26 +27,8 @@ Gitea Actions
|
||||
| global.imageRegistry | string | `""` | |
|
||||
| global.nameOverride | string | `""` | |
|
||||
| global.storageClass | string | `""` | |
|
||||
| image.digest | string | `""` | |
|
||||
| image.fullOverride | string | `""` | |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | |
|
||||
| image.registry | string | `"docker.gitea.com"` | |
|
||||
| image.repository | string | `"gitea"` | |
|
||||
| image.rootless | bool | `true` | |
|
||||
| image.tag | string | `""` | |
|
||||
| init.image.repository | string | `"busybox"` | |
|
||||
| init.image.tag | string | `"1.37.0"` | |
|
||||
| persistence.accessModes[0] | string | `"ReadWriteOnce"` | |
|
||||
| persistence.annotations."helm.sh/resource-policy" | string | `"keep"` | |
|
||||
| persistence.claimName | string | `"gitea-shared-storage"` | |
|
||||
| persistence.create | bool | `true` | |
|
||||
| persistence.enabled | bool | `true` | |
|
||||
| persistence.labels | object | `{}` | |
|
||||
| persistence.mount | bool | `true` | |
|
||||
| persistence.size | string | `"10Gi"` | |
|
||||
| persistence.storageClass | string | `nil` | |
|
||||
| persistence.subPath | string | `nil` | |
|
||||
| persistence.volumeName | string | `""` | |
|
||||
| statefulset.actRunner.config | string | `"log:\n level: debug\ncache:\n enabled: false\n"` | |
|
||||
| statefulset.actRunner.extraVolumeMounts | list | `[]` | |
|
||||
| statefulset.actRunner.pullPolicy | string | `"IfNotPresent"` | |
|
||||
@@ -63,6 +45,7 @@ Gitea Actions
|
||||
| statefulset.labels | object | `{}` | |
|
||||
| statefulset.nodeSelector | object | `{}` | |
|
||||
| statefulset.persistence.size | string | `"1Gi"` | |
|
||||
| statefulset.persistence.storageClass | string | `""` | |
|
||||
| statefulset.replicas | int | `1` | |
|
||||
| statefulset.resources | object | `{}` | |
|
||||
| statefulset.tolerations | list | `[]` | |
|
||||
|
||||
@@ -33,34 +33,11 @@ Create chart name and version as used by the chart label.
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create image name and tag used by the deployment.
|
||||
*/}}
|
||||
{{- define "gitea.actions.image" -}}
|
||||
{{- $fullOverride := .Values.image.fullOverride | default "" -}}
|
||||
{{- $registry := .Values.global.imageRegistry | default .Values.image.registry -}}
|
||||
{{- $repository := .Values.image.repository -}}
|
||||
{{- $separator := ":" -}}
|
||||
{{- $tag := .Values.image.tag | default .Chart.AppVersion | toString -}}
|
||||
{{- $rootless := ternary "-rootless" "" (.Values.image.rootless) -}}
|
||||
{{- $digest := "" -}}
|
||||
{{- if .Values.image.digest }}
|
||||
{{- $digest = (printf "@%s" (.Values.image.digest | toString)) -}}
|
||||
{{- end -}}
|
||||
{{- if $fullOverride }}
|
||||
{{- printf "%s" $fullOverride -}}
|
||||
{{- else if $registry }}
|
||||
{{- printf "%s/%s%s%s%s%s" $registry $repository $separator $tag $rootless $digest -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s%s%s%s%s" $repository $separator $tag $rootless $digest -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Storage Class
|
||||
*/}}
|
||||
{{- define "gitea.actions.persistence.storageClass" -}}
|
||||
{{- $storageClass := (tpl ( default "" .Values.persistence.storageClass) .) | default (tpl ( default "" .Values.global.storageClass) .) }}
|
||||
{{- $storageClass := (tpl ( default "" .Values.statefulset.persistence.storageClass) .) | default (tpl ( default "" .Values.global.storageClass) .) }}
|
||||
{{- if $storageClass }}
|
||||
storageClassName: {{ $storageClass | quote }}
|
||||
{{- end }}
|
||||
@@ -73,8 +50,8 @@ Common labels
|
||||
helm.sh/chart: {{ include "gitea.actions.chart" . }}
|
||||
app: {{ include "gitea.actions.name" . }}
|
||||
{{ include "gitea.actions.selectorLabels" . }}
|
||||
app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
||||
version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/version: {{ .Values.statefulset.actRunner.tag | default .Chart.AppVersion | quote }}
|
||||
version: {{ .Values.statefulset.actRunner.tag | default .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -82,8 +59,8 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
helm.sh/chart: {{ include "gitea.actions.chart" . }}
|
||||
app: {{ include "gitea.actions.name" . }}-act-runner
|
||||
{{ include "gitea.actions.selectorLabels.actRunner" . }}
|
||||
app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
||||
version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/version: {{ .Values.statefulset.actRunner.tag | default .Chart.AppVersion | quote }}
|
||||
version: {{ .Values.statefulset.actRunner.tag | default .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
## @param existingSecret Secret that contains the token
|
||||
## @param existingSecretKey Secret key
|
||||
## @param giteaRootURL URL the act_runner registers and connect with
|
||||
enabled: false
|
||||
enabled: true
|
||||
statefulset:
|
||||
replicas: 1
|
||||
annotations: {}
|
||||
@@ -75,6 +75,7 @@ statefulset:
|
||||
# value: "1"
|
||||
|
||||
persistence:
|
||||
storageClass: ""
|
||||
size: 1Gi
|
||||
|
||||
init:
|
||||
@@ -90,52 +91,6 @@ existingSecretKey: ""
|
||||
## Specify the root URL of the Gitea instance
|
||||
giteaRootURL: ""
|
||||
|
||||
## @section Persistence
|
||||
#
|
||||
## @param persistence.enabled Enable persistent storage
|
||||
## @param persistence.create Whether to create the persistentVolumeClaim for shared storage
|
||||
## @param persistence.mount Whether the persistentVolumeClaim should be mounted (even if not created)
|
||||
## @param persistence.claimName Use an existing claim to store repository information
|
||||
## @param persistence.size Size for persistence to store repo information
|
||||
## @param persistence.accessModes AccessMode for persistence
|
||||
## @param persistence.labels Labels for the persistence volume claim to be created
|
||||
## @param persistence.annotations.helm.sh/resource-policy Resource policy for the persistence volume claim
|
||||
## @param persistence.storageClass Name of the storage class to use
|
||||
## @param persistence.subPath Subdirectory of the volume to mount at
|
||||
## @param persistence.volumeName Name of persistent volume in PVC
|
||||
persistence:
|
||||
enabled: true
|
||||
create: true
|
||||
mount: true
|
||||
claimName: gitea-shared-storage
|
||||
size: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
labels: {}
|
||||
storageClass:
|
||||
subPath:
|
||||
volumeName: ""
|
||||
annotations:
|
||||
helm.sh/resource-policy: keep
|
||||
|
||||
## @section Image
|
||||
## @param image.registry image registry, e.g. gcr.io,docker.io
|
||||
## @param image.repository Image to start for this pod
|
||||
## @param image.tag Visit: [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated). Defaults to `appVersion` within Chart.yaml.
|
||||
## @param image.digest Image digest. Allows to pin the given image tag. Useful for having control over mutable tags like `latest`
|
||||
## @param image.pullPolicy Image pull policy
|
||||
## @param image.rootless Wether or not to pull the rootless version of Gitea, only works on Gitea 1.14.x or higher
|
||||
## @param image.fullOverride Completely overrides the image registry, path/image, tag and digest. **Adjust `image.rootless` accordingly and review [Rootless defaults](#rootless-defaults).**
|
||||
image:
|
||||
registry: "docker.gitea.com"
|
||||
repository: gitea
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
digest: ""
|
||||
pullPolicy: IfNotPresent
|
||||
rootless: true
|
||||
fullOverride: ""
|
||||
|
||||
## @section Global
|
||||
#
|
||||
## @param global.imageRegistry global image registry override
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: postgres-cluster
|
||||
version: 6.4.4
|
||||
version: 7.1.0
|
||||
description: Cloudnative-pg Cluster
|
||||
keywords:
|
||||
- database
|
||||
@@ -11,4 +11,4 @@ sources:
|
||||
maintainers:
|
||||
- name: alexlebens
|
||||
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
|
||||
appVersion: v1.26.0
|
||||
appVersion: v1.28.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# postgres-cluster
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
Cloudnative-pg Cluster
|
||||
|
||||
@@ -19,31 +19,30 @@ Cloudnative-pg Cluster
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| backup | object | `{"enabled":false,"method":"objectStore","objectStore":[],"scheduledBackups":[]}` | Backup settings |
|
||||
| backup.enabled | bool | `false` | You need to configure backups manually, so backups are disabled by default. |
|
||||
| backup | object | `{"method":"objectStore","objectStore":[],"scheduledBackups":[]}` | Backup settings |
|
||||
| backup.method | string | `"objectStore"` | Method to create backups, options currently are only objectStore |
|
||||
| backup.objectStore | list | `[]` | Options for object store backups |
|
||||
| backup.scheduledBackups | list | `[]` | List of scheduled backups |
|
||||
| cluster | object | `{"additionalLabels":{},"affinity":{"enablePodAntiAffinity":true,"topologyKey":"kubernetes.io/hostname"},"annotations":{},"certificates":{},"enablePDB":true,"enableSuperuserAccess":false,"image":{"repository":"ghcr.io/cloudnative-pg/postgresql","tag":"17.5-1-bullseye"},"imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"initdb":{},"instances":3,"logLevel":"info","monitoring":{"customQueries":[],"customQueriesSecret":[],"disableDefaultQueries":false,"enabled":false,"podMonitor":{"enabled":true,"metricRelabelings":[],"relabelings":[]},"prometheusRule":{"enabled":false,"excludeRules":[]}},"postgresGID":-1,"postgresUID":-1,"postgresql":{"ldap":{},"parameters":{"hot_standby_feedback":"on","max_slot_wal_keep_size":"2000MB","shared_buffers":"128MB"},"pg_hba":[],"pg_ident":[],"shared_preload_libraries":[],"synchronous":{}},"primaryUpdateMethod":"switchover","primaryUpdateStrategy":"unsupervised","priorityClassName":"","resources":{"limits":{"hugepages-2Mi":"256Mi"},"requests":{"cpu":"100m","memory":"256Mi"}},"roles":[],"serviceAccountTemplate":{},"services":{},"storage":{"size":"10Gi","storageClass":""},"superuserSecret":"","walStorage":{"enabled":true,"size":"2Gi","storageClass":""}}` | Cluster settings |
|
||||
| cluster | object | `{"additionalLabels":{},"affinity":{"enablePodAntiAffinity":true,"topologyKey":"kubernetes.io/hostname"},"annotations":{},"certificates":{},"enablePDB":true,"enableSuperuserAccess":false,"image":{"repository":"ghcr.io/cloudnative-pg/postgresql","tag":"18.1-standard-trixie"},"imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"initdb":{"database":"app","owner":"app"},"instances":3,"logLevel":"info","monitoring":{"customQueries":[],"customQueriesSecret":[],"disableDefaultQueries":false,"enabled":true,"podMonitor":{"enabled":true,"metricRelabelings":[],"relabelings":[]},"prometheusRule":{"enabled":true,"excludeRules":["CNPGClusterLastFailedArchiveTimeWarning"]}},"postgresGID":-1,"postgresUID":-1,"postgresql":{"ldap":{},"parameters":{"hot_standby_feedback":"on","max_slot_wal_keep_size":"2000MB","shared_buffers":"128MB"},"pg_hba":[],"pg_ident":[],"shared_preload_libraries":[],"synchronous":{}},"primaryUpdateMethod":"switchover","primaryUpdateStrategy":"unsupervised","priorityClassName":"","resources":{"limits":{"hugepages-2Mi":"256Mi"},"requests":{"cpu":"100m","memory":"256Mi"}},"roles":[],"serviceAccountTemplate":{},"services":{},"storage":{"size":"10Gi","storageClass":""},"superuserSecret":"","walStorage":{"enabled":true,"size":"2Gi","storageClass":""}}` | Cluster settings |
|
||||
| cluster.affinity | object | `{"enablePodAntiAffinity":true,"topologyKey":"kubernetes.io/hostname"}` | Affinity/Anti-affinity rules for Pods. See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-AffinityConfiguration |
|
||||
| cluster.certificates | object | `{}` | The configuration for the CA and related certificates. See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-CertificatesConfiguration |
|
||||
| cluster.enablePDB | bool | `true` | Allow to disable PDB, mainly useful for upgrade of single-instance clusters or development purposes See: https://cloudnative-pg.io/documentation/current/kubernetes_upgrade/#pod-disruption-budgets |
|
||||
| cluster.enableSuperuserAccess | bool | `false` | When this option is enabled, the operator will use the SuperuserSecret to update the postgres user password. If the secret is not present, the operator will automatically create one. When this option is disabled, the operator will ignore the SuperuserSecret content, delete it when automatically created, and then blank the password of the postgres user by setting it to NULL. |
|
||||
| cluster.image | object | `{"repository":"ghcr.io/cloudnative-pg/postgresql","tag":"17.5-1-bullseye"}` | Default image |
|
||||
| cluster.image | object | `{"repository":"ghcr.io/cloudnative-pg/postgresql","tag":"18.1-standard-trixie"}` | Default image |
|
||||
| cluster.imagePullPolicy | string | `"IfNotPresent"` | Image pull policy. One of Always, Never or IfNotPresent. If not defined, it defaults to IfNotPresent. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images |
|
||||
| cluster.imagePullSecrets | list | `[]` | The list of pull secrets to be used to pull the images. See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-LocalObjectReference |
|
||||
| cluster.initdb | object | `{}` | Bootstrap is the configuration of the bootstrap process when initdb is used. See: https://cloudnative-pg.io/documentation/current/bootstrap/ See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb |
|
||||
| cluster.initdb | object | `{"database":"app","owner":"app"}` | Bootstrap is the configuration of the bootstrap process when initdb is used. See: https://cloudnative-pg.io/documentation/current/bootstrap/ See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb |
|
||||
| cluster.logLevel | string | `"info"` | The instances' log level, one of the following values: error, warning, info (default), debug, trace |
|
||||
| cluster.monitoring | object | `{"customQueries":[],"customQueriesSecret":[],"disableDefaultQueries":false,"enabled":false,"podMonitor":{"enabled":true,"metricRelabelings":[],"relabelings":[]},"prometheusRule":{"enabled":false,"excludeRules":[]}}` | Enable default monitoring and alert rules |
|
||||
| cluster.monitoring | object | `{"customQueries":[],"customQueriesSecret":[],"disableDefaultQueries":false,"enabled":true,"podMonitor":{"enabled":true,"metricRelabelings":[],"relabelings":[]},"prometheusRule":{"enabled":true,"excludeRules":["CNPGClusterLastFailedArchiveTimeWarning"]}}` | Enable default monitoring and alert rules |
|
||||
| cluster.monitoring.customQueries | list | `[]` | Custom Prometheus metrics Will be stored in the ConfigMap |
|
||||
| cluster.monitoring.customQueriesSecret | list | `[]` | The list of secrets containing the custom queries |
|
||||
| cluster.monitoring.disableDefaultQueries | bool | `false` | Whether the default queries should be injected. Set it to true if you don't want to inject default queries into the cluster. |
|
||||
| cluster.monitoring.enabled | bool | `false` | Whether to enable monitoring |
|
||||
| cluster.monitoring.enabled | bool | `true` | Whether to enable monitoring |
|
||||
| cluster.monitoring.podMonitor.enabled | bool | `true` | Whether to enable the PodMonitor |
|
||||
| cluster.monitoring.podMonitor.metricRelabelings | list | `[]` | The list of metric relabelings for the PodMonitor. Applied to samples before ingestion. |
|
||||
| cluster.monitoring.podMonitor.relabelings | list | `[]` | The list of relabelings for the PodMonitor. Applied to samples before scraping. |
|
||||
| cluster.monitoring.prometheusRule.enabled | bool | `false` | Whether to enable the PrometheusRule automated alerts |
|
||||
| cluster.monitoring.prometheusRule.excludeRules | list | `[]` | Exclude specified rules |
|
||||
| cluster.monitoring.prometheusRule.enabled | bool | `true` | Whether to enable the PrometheusRule automated alerts |
|
||||
| cluster.monitoring.prometheusRule.excludeRules | list | `["CNPGClusterLastFailedArchiveTimeWarning"]` | Exclude specified rules |
|
||||
| cluster.postgresUID | int | `-1` | The UID and GID of the postgres user inside the image, defaults to 26 |
|
||||
| cluster.postgresql | object | `{"ldap":{},"parameters":{"hot_standby_feedback":"on","max_slot_wal_keep_size":"2000MB","shared_buffers":"128MB"},"pg_hba":[],"pg_ident":[],"shared_preload_libraries":[],"synchronous":{}}` | Parameters to be set for the database itself See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-PostgresConfiguration |
|
||||
| cluster.postgresql.ldap | object | `{}` | PostgreSQL LDAP configuration (see https://cloudnative-pg.io/documentation/current/postgresql_conf/#ldap-configuration) |
|
||||
@@ -59,11 +58,12 @@ Cloudnative-pg Cluster
|
||||
| cluster.serviceAccountTemplate | object | `{}` | Configure the metadata of the generated service account |
|
||||
| cluster.services | object | `{}` | Customization of service definitions. Please refer to https://cloudnative-pg.io/documentation/current/service_management/ |
|
||||
| cluster.storage | object | `{"size":"10Gi","storageClass":""}` | Default storage size |
|
||||
| databases | list | `[]` | Database management configuration |
|
||||
| mode | string | `"standalone"` | Cluster mode of operation. Available modes: * `standalone` - Default mode. Creates new or updates an existing CNPG cluster. * `recovery` - Same as standalone but creates a cluster from a backup, object store or via pg_basebackup |
|
||||
| nameOverride | string | `""` | Override the name of the cluster |
|
||||
| namespaceOverride | string | `""` | Override the namespace of the chart |
|
||||
| poolers | list | `[]` | List of PgBouncer poolers |
|
||||
| recovery | object | `{"backup":{"backupName":"","database":"app","owner":"","pitrTarget":{"time":""}},"import":{"databases":[],"pgDumpExtraOptions":[],"pgRestoreExtraOptions":[],"postImportApplicationSQL":[],"roles":[],"schemaOnly":false,"source":{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"verify-full","sslRootCertSecret":{"key":"","name":""},"username":"app"},"type":"microservice"},"method":"backup","objectStore":{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"database":"app","destinationPath":"","endpointCA":{"create":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"https://nyc3.digitaloceanspaces.com","index":1,"name":"recovery","owner":"","pitrTarget":{"time":""},"wal":{"compression":"snappy","encryption":"","maxParallel":1}},"pgBaseBackup":{"database":"app","owner":"","secret":"","source":{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"verify-full","sslRootCertSecret":{"key":"","name":""},"username":""}}}` | Recovery settings when booting cluster from external cluster |
|
||||
| recovery | object | `{"backup":{"backupName":"","database":"app","owner":"","pitrTarget":{"time":""}},"import":{"databases":[],"pgDumpExtraOptions":[],"pgRestoreExtraOptions":[],"postImportApplicationSQL":[],"roles":[],"schemaOnly":false,"source":{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"verify-full","sslRootCertSecret":{"key":"","name":""},"username":"app"},"type":"microservice"},"method":"backup","objectStore":{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"database":"app","destinationPath":"","endpointCA":{"create":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"https://nyc3.digitaloceanspaces.com","index":1,"name":"recovery","owner":"","pitrTarget":{"time":""},"wal":{"compression":"snappy","encryption":"","maxParallel":1}},"pgBaseBackup":{"database":"app","owner":"","secret":"","source":{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"disable","sslRootCertSecret":{"key":"","name":""},"username":""}}}` | Recovery settings when booting cluster from external cluster |
|
||||
| recovery.backup.backupName | string | `""` | Name of the backup to recover from. |
|
||||
| recovery.backup.database | string | `"app"` | Name of the database used by the application. Default: `app`. |
|
||||
| recovery.backup.owner | string | `""` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. |
|
||||
@@ -104,12 +104,12 @@ Cloudnative-pg Cluster
|
||||
| recovery.pgBaseBackup.database | string | `"app"` | Name of the database used by the application. Default: `app`. |
|
||||
| recovery.pgBaseBackup.owner | string | `""` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. |
|
||||
| recovery.pgBaseBackup.secret | string | `""` | Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch |
|
||||
| recovery.pgBaseBackup.source | object | `{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"verify-full","sslRootCertSecret":{"key":"","name":""},"username":""}` | Configuration for the source database |
|
||||
| recovery.pgBaseBackup.source | object | `{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"disable","sslRootCertSecret":{"key":"","name":""},"username":""}` | Configuration for the source database |
|
||||
| recovery.pgBaseBackup.source.passwordSecret.create | bool | `false` | Whether to create a secret for the password |
|
||||
| recovery.pgBaseBackup.source.passwordSecret.key | string | `"password"` | The key in the secret containing the password |
|
||||
| recovery.pgBaseBackup.source.passwordSecret.name | string | `""` | Name of the secret containing the password |
|
||||
| recovery.pgBaseBackup.source.passwordSecret.value | string | `""` | The password value to use when creating the secret |
|
||||
| type | string | `"postgresql"` | Type of the CNPG database. Available types: * `postgresql` * `tensorchord` |
|
||||
| type | string | `"postgresql"` | Type of the CNPG database. Available types: * `postgresql` |
|
||||
|
||||
----------------------------------------------
|
||||
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
|
||||
|
||||
@@ -6,7 +6,7 @@ annotations:
|
||||
description: |-
|
||||
Archiving failed for {{`{{`}} $labels.pod {{`}}`}}
|
||||
expr: |
|
||||
(cnpg_pg_stat_archiver_last_failed_time - cnpg_pg_stat_archiver_last_archived_time) > 1
|
||||
(cnpg_pg_stat_archiver_last_failed_time - cnpg_pg_stat_archiver_last_archived_time) > 2
|
||||
for: 1m
|
||||
labels:
|
||||
severity: warning
|
||||
|
||||
@@ -11,21 +11,8 @@ bootstrap:
|
||||
{{- if .Values.cluster.initdb.owner }}
|
||||
owner: {{ tpl .Values.cluster.initdb.owner . }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.type "tensorchord" }}
|
||||
dataChecksums: true
|
||||
{{- end }}
|
||||
{{- if or (eq .Values.type "tensorchord") (.Values.cluster.initdb.postInitApplicationSQL) }}
|
||||
{{- if (.Values.cluster.initdb.postInitApplicationSQL) }}
|
||||
postInitApplicationSQL:
|
||||
{{- if eq .Values.type "tensorchord" }}
|
||||
- ALTER SYSTEM SET search_path TO "$user", public, vectors;
|
||||
- SET search_path TO "$user", public, vectors;
|
||||
- CREATE EXTENSION IF NOT EXISTS "vectors";
|
||||
- CREATE EXTENSION IF NOT EXISTS "cube";
|
||||
- CREATE EXTENSION IF NOT EXISTS "earthdistance";
|
||||
- ALTER SCHEMA vectors OWNER TO "app";
|
||||
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA vectors TO "app";
|
||||
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "app";
|
||||
{{- end }}
|
||||
{{- with .Values.cluster.initdb }}
|
||||
{{- range .postInitApplicationSQL }}
|
||||
{{- printf "- %s" . | nindent 6 }}
|
||||
@@ -36,7 +23,7 @@ bootstrap:
|
||||
{{- else if eq .Values.mode "recovery" -}}
|
||||
bootstrap:
|
||||
|
||||
{{- if eq .Values.recovery.method "pgBaseBackup" }}
|
||||
{{- if eq .Values.recovery.method "pgBaseBackup" }}
|
||||
pg_basebackup:
|
||||
source: pgBaseBackupSource
|
||||
{{ with .Values.recovery.pgBaseBackup.database }}
|
||||
@@ -49,10 +36,8 @@ bootstrap:
|
||||
secret:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
externalClusters:
|
||||
{{- include "cluster.externalSourceCluster" (list "pgBaseBackupSource" .Values.recovery.pgBaseBackup.source) | nindent 2 }}
|
||||
|
||||
{{- else if eq .Values.recovery.method "import" }}
|
||||
{{- else if eq .Values.recovery.method "import" }}
|
||||
initdb:
|
||||
{{- with .Values.cluster.initdb }}
|
||||
{{- with (omit . "owner" "import" "postInitApplicationSQL") }}
|
||||
@@ -76,7 +61,7 @@ externalClusters:
|
||||
{{- end }}
|
||||
{{- if eq .Values.recovery.import.type "monolith" }}
|
||||
roles:
|
||||
{{- with .Values.replica.importRoles }}
|
||||
{{- with .Values.recovery.import.roles }}
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -95,10 +80,8 @@ externalClusters:
|
||||
pgRestoreExtraOptions:
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
externalClusters:
|
||||
{{- include "cluster.externalSourceCluster" (list "importSource" .Values.recovery.import.source) | nindent 2 }}
|
||||
|
||||
{{- else if eq .Values.recovery.method "backup" }}
|
||||
{{- else if eq .Values.recovery.method "backup" }}
|
||||
recovery:
|
||||
{{- with .Values.recovery.backup.pitrTarget.time }}
|
||||
recoveryTarget:
|
||||
@@ -113,7 +96,7 @@ externalClusters:
|
||||
backup:
|
||||
name: {{ .Values.recovery.backup.backupName }}
|
||||
|
||||
{{- else if eq .Values.recovery.method "objectStore" }}
|
||||
{{- else if eq .Values.recovery.method "objectStore" }}
|
||||
recovery:
|
||||
{{- with .Values.recovery.objectStore.pitrTarget.time }}
|
||||
recoveryTarget:
|
||||
@@ -127,19 +110,9 @@ externalClusters:
|
||||
{{- end }}
|
||||
source: {{ include "cluster.recoveryServerName" . }}
|
||||
|
||||
externalClusters:
|
||||
- name: {{ include "cluster.recoveryServerName" . }}
|
||||
plugin:
|
||||
name: barman-cloud.cloudnative-pg.io
|
||||
enabled: true
|
||||
isWALArchiver: false
|
||||
parameters:
|
||||
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
|
||||
serverName: {{ include "cluster.recoveryServerName" . }}
|
||||
|
||||
{{- else }}
|
||||
{{- else }}
|
||||
{{ fail "Invalid recovery mode!" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- else }}
|
||||
{{ fail "Invalid cluster mode!" }}
|
||||
|
||||
24
charts/postgres-cluster/templates/_external_clusters.tpl
Normal file
24
charts/postgres-cluster/templates/_external_clusters.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
{{- define "cluster.externalClusters" -}}
|
||||
externalClusters:
|
||||
{{- if eq .Values.mode "standalone" }}
|
||||
{{- else if eq .Values.mode "recovery" }}
|
||||
{{- if eq .Values.recovery.method "pgBaseBackup" }}
|
||||
- name: pgBaseBackupSource
|
||||
{{- include "cluster.externalSourceCluster" .Values.recovery.pgBaseBackup.source | nindent 4 }}
|
||||
{{- else if eq .Values.recovery.method "import" }}
|
||||
- name: importSource
|
||||
{{- include "cluster.externalSourceCluster" .Values.recovery.import.source | nindent 4 }}
|
||||
{{- else if eq .Values.recovery.method "objectStore" }}
|
||||
- name: {{ include "cluster.recoveryServerName" . }}
|
||||
plugin:
|
||||
name: barman-cloud.cloudnative-pg.io
|
||||
enabled: true
|
||||
isWALArchiver: false
|
||||
barmanObjectStore:
|
||||
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
|
||||
serverName: {{ include "cluster.recoveryServerName" . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{ fail "Invalid cluster mode!" }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
@@ -83,21 +83,3 @@ Generate recovery server name
|
||||
{{- printf "%s-backup-%s" (include "cluster.name" .) (toString .Values.recovery.objectStore.index) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate name for recovery object store credentials
|
||||
*/}}
|
||||
{{- define "cluster.recoveryCredentials" -}}
|
||||
{{- if .Values.recovery.endpointCredentials -}}
|
||||
{{- .Values.recovery.endpointCredentials -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate name for backup object store credentials
|
||||
*/}}
|
||||
{{- define "cluster.backupCredentials" -}}
|
||||
{{- printf "%s-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
|
||||
@@ -19,29 +19,6 @@ spec:
|
||||
{{- end }}
|
||||
postgresUID: {{ include "cluster.postgresUID" . }}
|
||||
postgresGID: {{ include "cluster.postgresGID" . }}
|
||||
{{ if or (eq .Values.backup.method "objectStore") (eq .Values.recovery.method "objectStore") }}
|
||||
plugins:
|
||||
{{ end }}
|
||||
{{- range $objectStore := .Values.backup.objectStore }}
|
||||
- name: barman-cloud.cloudnative-pg.io
|
||||
enabled: true
|
||||
isWALArchiver: {{ $objectStore.isWALArchiver | default true }}
|
||||
parameters:
|
||||
barmanObjectName: "{{ include "cluster.name" $ }}-{{ $objectStore.name }}-backup"
|
||||
{{- if $objectStore.clusterName }}
|
||||
serverName: "{{ $objectStore.clusterName }}-backup-{{ $objectStore.index }}"
|
||||
{{- else }}
|
||||
serverName: "{{ include "cluster.name" $ }}-backup-{{ $objectStore.index }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ if eq .Values.recovery.method "objectStore" }}
|
||||
- name: barman-cloud.cloudnative-pg.io
|
||||
enabled: true
|
||||
isWALArchiver: false
|
||||
parameters:
|
||||
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
|
||||
serverName: {{ include "cluster.recoveryServerName" . }}
|
||||
{{ end }}
|
||||
storage:
|
||||
size: {{ .Values.cluster.storage.size }}
|
||||
{{- if not (empty .Values.cluster.storage.storageClass) }}
|
||||
@@ -81,11 +58,8 @@ spec:
|
||||
enablePDB: {{ .Values.cluster.enablePDB }}
|
||||
|
||||
postgresql:
|
||||
{{- if or (eq .Values.type "tensorchord") (not (empty .Values.cluster.postgresql.shared_preload_libraries)) }}
|
||||
{{- if .Values.cluster.postgresql.shared_preload_libraries }}
|
||||
shared_preload_libraries:
|
||||
{{- if eq .Values.type "tensorchord" }}
|
||||
- vectors.so
|
||||
{{- end }}
|
||||
{{- with .Values.cluster.postgresql.shared_preload_libraries }}
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -155,4 +129,23 @@ spec:
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
plugins:
|
||||
{{- range $objectStore := .Values.backup.objectStore }}
|
||||
- name: barman-cloud.cloudnative-pg.io
|
||||
enabled: true
|
||||
{{- if $objectStore.isWALArchiver }}
|
||||
isWALArchiver: true
|
||||
{{- else }}
|
||||
isWALArchiver: false
|
||||
{{- end }}
|
||||
parameters:
|
||||
barmanObjectName: "{{ include "cluster.name" $ }}-{{ $objectStore.name }}-backup"
|
||||
{{- if $objectStore.clusterName }}
|
||||
serverName: "{{ $objectStore.clusterName }}-backup-{{ $objectStore.index }}"
|
||||
{{- else }}
|
||||
serverName: "{{ include "cluster.name" $ }}-backup-{{ $objectStore.index }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ include "cluster.bootstrap" . | nindent 2 }}
|
||||
{{ include "cluster.externalClusters" . | nindent 2 }}
|
||||
|
||||
76
charts/postgres-cluster/templates/databases.yaml
Normal file
76
charts/postgres-cluster/templates/databases.yaml
Normal file
@@ -0,0 +1,76 @@
|
||||
{{- range .Values.databases }}
|
||||
---
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Database
|
||||
metadata:
|
||||
name: {{ include "cluster.name" $ }}-database-{{ .name | replace "_" "-" }}
|
||||
namespace: {{ include "cluster.namespace" $ }}
|
||||
labels:
|
||||
{{- include "cluster.labels" $ | nindent 4 }}
|
||||
spec:
|
||||
name: {{ .name }}
|
||||
cluster:
|
||||
name: {{ include "cluster.name" $ }}
|
||||
ensure: {{ .ensure | default "present" }}
|
||||
owner: {{ .owner }}
|
||||
template: {{ .template | default "template1" }}
|
||||
encoding: {{ .encoding | default "UTF8" }}
|
||||
databaseReclaimPolicy: {{ .databaseReclaimPolicy | default "retain" }}
|
||||
{{- with .isTemplate }}
|
||||
isTemplate: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .allowConnections }}
|
||||
allowConnections: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .connectionLimit }}
|
||||
connectionLimit: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .tablespace }}
|
||||
tablespace: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .locale }}
|
||||
locale: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .localeProvider }}
|
||||
localeProvider: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .localeCollate }}
|
||||
localeCollate: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .localeCType }}
|
||||
localeCType: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .icuLocale }}
|
||||
icuLocale: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .icuRules }}
|
||||
icuRules: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .builtinLocale }}
|
||||
builtinLocale: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .collationVersion }}
|
||||
collationVersion: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .schemas }}
|
||||
schemas:
|
||||
{{- range . }}
|
||||
- name: {{ .name }}
|
||||
owner: {{ .owner }}
|
||||
ensure: {{ .ensure | default "present" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .extensions }}
|
||||
extensions:
|
||||
{{- range . }}
|
||||
- name: {{ .name }}
|
||||
{{- with .version }}
|
||||
version: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .schema }}
|
||||
schema: {{ . }}
|
||||
{{- end }}
|
||||
ensure: {{ .ensure | default "present" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ if and (.Values.backup.enabled) (eq .Values.backup.method "objectStore") }}
|
||||
{{ if (eq .Values.backup.method "objectStore") }}
|
||||
{{ $context := . -}}
|
||||
{{ range .Values.backup.objectStore -}}
|
||||
---
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
{{ end }}
|
||||
maxParallel: {{ .wal.maxParallel | default "1" }}
|
||||
{{- end }}
|
||||
{{- if .wal }}
|
||||
{{- if .data }}
|
||||
data:
|
||||
compression: {{ .data.compression | default "snappy" }}
|
||||
{{- with .data.encryption }}
|
||||
@@ -37,19 +37,16 @@ spec:
|
||||
{{- end }}
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
{{- if .endpointCredentials }}
|
||||
name: {{ .endpointCredentials }}
|
||||
{{- else }}
|
||||
name: {{ include "cluster.backupCredentials" $context }}
|
||||
{{- end }}
|
||||
name: {{ .endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-") }}
|
||||
key: ACCESS_KEY_ID
|
||||
secretAccessKey:
|
||||
{{- if .endpointCredentials }}
|
||||
name: {{ .endpointCredentials }}
|
||||
{{- else }}
|
||||
name: {{ include "cluster.backupCredentials" $context }}
|
||||
{{- end }}
|
||||
name: {{ .endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-") }}
|
||||
key: ACCESS_SECRET_KEY
|
||||
{{- if .endpointCredentialsIncludeRegion }}
|
||||
region:
|
||||
name: {{ .endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-") }}
|
||||
key: ACCESS_REGION
|
||||
{{- end }}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
@@ -85,9 +82,9 @@ spec:
|
||||
jobs: {{ .Values.recovery.objectStore.data.jobs }}
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
name: {{ include "cluster.recoveryCredentials" . }}
|
||||
name: {{ .Values.recovery.objectStore.endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-") }}
|
||||
key: ACCESS_KEY_ID
|
||||
secretAccessKey:
|
||||
name: {{ include "cluster.recoveryCredentials" . }}
|
||||
name: {{ .Values.recovery.objectStore.endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-") }}
|
||||
key: ACCESS_SECRET_KEY
|
||||
{{ end }}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{{ if .Values.backup.enabled }}
|
||||
{{ $context := . -}}
|
||||
{{ range .Values.backup.scheduledBackups -}}
|
||||
---
|
||||
@@ -10,7 +9,7 @@ metadata:
|
||||
labels:
|
||||
{{- include "cluster.labels" $context | nindent 4 }}
|
||||
spec:
|
||||
immediate: {{ .immediate | default true }}
|
||||
immediate: {{ .immediate | default false }}
|
||||
suspend: {{ .suspend | default false }}
|
||||
schedule: {{ .schedule | quote | required "Schedule is required" }}
|
||||
backupOwnerReference: {{ .backupOwnerReference | default "self" }}
|
||||
@@ -22,4 +21,3 @@ spec:
|
||||
parameters:
|
||||
barmanObjectName: "{{ include "cluster.name" $context }}-{{ .backupName }}-backup"
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
@@ -6,7 +6,6 @@ namespaceOverride: ""
|
||||
|
||||
# -- Type of the CNPG database. Available types:
|
||||
# * `postgresql`
|
||||
# * `tensorchord`
|
||||
type: postgresql
|
||||
|
||||
# -- Cluster mode of operation. Available modes:
|
||||
@@ -21,7 +20,7 @@ cluster:
|
||||
# -- Default image
|
||||
image:
|
||||
repository: ghcr.io/cloudnative-pg/postgresql
|
||||
tag: "17.5-1-bullseye"
|
||||
tag: 18.1-standard-trixie
|
||||
|
||||
# -- Image pull policy. One of Always, Never or IfNotPresent. If not defined, it defaults to IfNotPresent. Cannot be updated.
|
||||
# More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
|
||||
@@ -110,7 +109,7 @@ cluster:
|
||||
monitoring:
|
||||
|
||||
# -- Whether to enable monitoring
|
||||
enabled: false
|
||||
enabled: true
|
||||
|
||||
podMonitor:
|
||||
|
||||
@@ -128,10 +127,11 @@ cluster:
|
||||
prometheusRule:
|
||||
|
||||
# -- Whether to enable the PrometheusRule automated alerts
|
||||
enabled: false
|
||||
enabled: true
|
||||
|
||||
# -- Exclude specified rules
|
||||
excludeRules: []
|
||||
excludeRules:
|
||||
- CNPGClusterLastFailedArchiveTimeWarning
|
||||
|
||||
# -- Whether the default queries should be injected.
|
||||
# Set it to true if you don't want to inject default queries into the cluster.
|
||||
@@ -197,9 +197,9 @@ cluster:
|
||||
# -- Bootstrap is the configuration of the bootstrap process when initdb is used.
|
||||
# See: https://cloudnative-pg.io/documentation/current/bootstrap/
|
||||
# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb
|
||||
initdb: {}
|
||||
# database: app
|
||||
# owner: "" # Defaults to the database name
|
||||
initdb:
|
||||
database: app
|
||||
owner: app
|
||||
# secret:
|
||||
# name: "" # Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch
|
||||
# options: []
|
||||
@@ -330,7 +330,7 @@ recovery:
|
||||
port: 5432
|
||||
username: ""
|
||||
database: "app"
|
||||
sslMode: "verify-full"
|
||||
sslMode: "disable"
|
||||
passwordSecret:
|
||||
|
||||
# -- Whether to create a secret for the password
|
||||
@@ -417,9 +417,6 @@ recovery:
|
||||
# -- Backup settings
|
||||
backup:
|
||||
|
||||
# -- You need to configure backups manually, so backups are disabled by default.
|
||||
enabled: false
|
||||
|
||||
# -- Method to create backups, options currently are only objectStore
|
||||
method: objectStore
|
||||
|
||||
@@ -510,6 +507,35 @@ backup:
|
||||
# # -- Name of backup target
|
||||
# backupName: external
|
||||
|
||||
# -- Database management configuration
|
||||
databases: []
|
||||
# - name: app # -- Name of the database to be created.
|
||||
# ensure: present # -- Ensure the PostgreSQL database is present or absent - defaults to "present".
|
||||
# owner: app # -- Owner of the database, defaults to the value of the `name` key.
|
||||
# template: template1 # -- Maps to the TEMPLATE parameter.
|
||||
# encoding: UTF8 # -- Maps to the ENCODING parameter.
|
||||
# connectionLimit: -1 # -- Maps to the CONNECTION LIMIT parameter. -1 (the default) means no limit.
|
||||
# tablespace: "" # -- Maps to the TABLESPACE parameter and ALTER DATABASE.
|
||||
# databaseReclaimPolicy: retain # -- One of: retain / delete (retain by default).
|
||||
# schemas: [] # -- List of schemas to be created in the database.
|
||||
# # - name: myschema
|
||||
# # owner: app # -- Owner of the schema, defaults to the database owner.
|
||||
# # ensure: present # -- Ensure the PostgreSQL schema is present or absent - defaults to "present".
|
||||
# extensions: [] # -- List of extensions to be created in the database.
|
||||
# # - name: pg_search
|
||||
# # ensure: present # -- Ensure the PostgreSQL extension is present or absent - defaults to "present".
|
||||
# # version: "0.15.21" # -- Version of the extension to be installed, if not specified the latest version will be used.
|
||||
# # schema: "" # -- Schema where the extension will be installed, if not specified the extensions or current default object creation schema will be used.
|
||||
# isTemplate: false # -- Maps to the IS_TEMPLATE parameter. If true, the database is considered a template for new databases.
|
||||
# locale: "" # -- Maps to the LC_COLLATE and LC_CTYPE parameters
|
||||
# localeProvider: "" # -- Maps to the LOCALE_PROVIDER parameter. Available from PostgreSQL 16.
|
||||
# localeCollate: "" # -- Maps to the LC_COLLATE parameter
|
||||
# localeCType: "" # -- Maps to the LC_CTYPE parameter
|
||||
# icuLocale: "" # -- Maps to the ICU_LOCALE parameter. Available from PostgreSQL 15.
|
||||
# icuRules: "" # -- Maps to the ICU_RULES parameter. Available from PostgreSQL 16.
|
||||
# builtinLocale: "" # -- Maps to the BUILTIN_LOCALE parameter. Available from PostgreSQL 17.
|
||||
# collationVersion: "" # -- Maps to the COLLATION_VERSION parameter.
|
||||
|
||||
# -- List of PgBouncer poolers
|
||||
poolers: []
|
||||
# -
|
||||
|
||||
15
charts/redis-replication/Chart.yaml
Normal file
15
charts/redis-replication/Chart.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v2
|
||||
name: redis-replication
|
||||
version: 0.1.0
|
||||
description: Redis Replication with Sentinel
|
||||
keywords:
|
||||
- redis-operator
|
||||
- redis
|
||||
- kubernetes
|
||||
sources:
|
||||
- https://github.com/OT-CONTAINER-KIT/redis-operator
|
||||
- https://github.com/OT-CONTAINER-KIT/redis-operator/tree/main/charts/redis-operator
|
||||
maintainers:
|
||||
- name: alexlebens
|
||||
icon: https://github.com/OT-CONTAINER-KIT/redis-operator/raw/main/static/redis-operator-logo.svg
|
||||
appVersion: v0.21.0
|
||||
39
charts/redis-replication/README.md
Normal file
39
charts/redis-replication/README.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# redis-replication
|
||||
|
||||
 
|
||||
|
||||
Redis Replication with Sentinel
|
||||
|
||||
## Maintainers
|
||||
|
||||
| Name | Email | Url |
|
||||
| ---- | ------ | --- |
|
||||
| alexlebens | | |
|
||||
|
||||
## Source Code
|
||||
|
||||
* <https://github.com/OT-CONTAINER-KIT/redis-operator>
|
||||
* <https://github.com/OT-CONTAINER-KIT/redis-operator/tree/main/charts/redis-operator>
|
||||
|
||||
## Values
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| additionalLabels | object | `{}` | Add additional labels |
|
||||
| existingSecret | object | `{"enabled":false,"key":"password","name":"secret-name"}` | Password |
|
||||
| namespaceOverride | string | `""` | Override the namespace of the chart |
|
||||
| redisReplication | object | `{"clusterSize":3,"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis","tag":"v8.4.0"},"podSecurityContext":{"fsGroup":1000,"runAsUser":1000},"redisExporter":{"enabled":true,"image":{"repository":"quay.io/opstree/redis-exporter","tag":"v1.80.1"}},"resources":{"requests":{"cpu":"10m","memory":"128Mi"}},"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"storageClassName":"ceph-block"}}}` | Redis Replication settings |
|
||||
| redisReplication.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis","tag":"v8.4.0"}` | Image |
|
||||
| redisReplication.podSecurityContext | object | `{"fsGroup":1000,"runAsUser":1000}` | Security |
|
||||
| redisReplication.redisExporter | object | `{"enabled":true,"image":{"repository":"quay.io/opstree/redis-exporter","tag":"v1.80.1"}}` | Metrics |
|
||||
| redisReplication.resources | object | `{"requests":{"cpu":"10m","memory":"128Mi"}}` | Resources |
|
||||
| redisReplication.volumeClaimTemplate | object | `{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"storageClassName":"ceph-block"}}` | Storage |
|
||||
| redisSentinel | object | `{"clusterSize":3,"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"},"podSecurityContext":{"fsGroup":1000,"runAsUser":1000},"resources":{"requests":{"cpu":"10m","memory":"128Mi"}}}` | Redis Sentinel settings |
|
||||
| redisSentinel.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"}` | Image |
|
||||
| redisSentinel.podSecurityContext | object | `{"fsGroup":1000,"runAsUser":1000}` | Security |
|
||||
| redisSentinel.resources | object | `{"requests":{"cpu":"10m","memory":"128Mi"}}` | Resources |
|
||||
| replicationNameOverride | string | `""` | Override the name of the resources |
|
||||
| sentinelNameOverride | string | `""` | |
|
||||
|
||||
----------------------------------------------
|
||||
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
|
||||
65
charts/redis-replication/templates/_helpers.tpl
Normal file
65
charts/redis-replication/templates/_helpers.tpl
Normal file
@@ -0,0 +1,65 @@
|
||||
{{/*
|
||||
Expand the names
|
||||
*/}}
|
||||
{{- define "redis.replicationName" -}}
|
||||
{{- if .Values.replicationNameOverride }}
|
||||
{{- .Values.replicationNameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "redis-replication-%s" .Release.Name -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "redis.sentinelName" -}}
|
||||
{{- if .Values.sentinelNameOverride }}
|
||||
{{- .Values.sentinelNameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "redis-sentinel-%s" .Release.Name -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
|
||||
*/}}
|
||||
{{- define "redis.namespace" -}}
|
||||
{{- if .Values.namespaceOverride -}}
|
||||
{{- .Values.namespaceOverride -}}
|
||||
{{- else -}}
|
||||
{{- .Release.Namespace -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "redis.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "redis.labels" -}}
|
||||
helm.sh/chart: {{ include "redis.chart" $ }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.Version | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- with .Values.additionalLabels }}
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "redis.replicationSelectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "redis.replicationName" $ }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "redis.sentinelSelectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "redis.sentinelName" $ }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
39
charts/redis-replication/templates/redis-replication.yaml
Normal file
39
charts/redis-replication/templates/redis-replication.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
apiVersion: redis.redis.opstreelabs.in/v1beta2
|
||||
kind: RedisReplication
|
||||
metadata:
|
||||
name: {{ include "redis.replicationName" . }}
|
||||
namespace: {{ include "redis.namespace" . }}
|
||||
labels:
|
||||
{{- include "redis.labels" . | nindent 4 }}
|
||||
{{- include "redis.replicationSelectorLabels" . | nindent 4 }}
|
||||
spec:
|
||||
clusterSize: {{ .Values.redisReplication.clusterSize }}
|
||||
|
||||
podSecurityContext:
|
||||
{{- with .Values.redisReplication.podSecurityContext }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{ end }}
|
||||
|
||||
kubernetesConfig:
|
||||
image: "{{ .Values.redisReplication.image.repository }}:{{ .Values.redisReplication.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.redisReplication.image.pullPolicy }}
|
||||
resources:
|
||||
{{- with .Values.redisReplication.resources }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Values.existingSecret.enabled }}
|
||||
redisSecret:
|
||||
name: {{ .Values.existingSecret.name }}
|
||||
key: {{ .Values.existingSecret.key }}
|
||||
{{ end }}
|
||||
|
||||
storage:
|
||||
volumeClaimTemplate:
|
||||
{{- with .Values.redisReplication.volumeClaimTemplate }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{ end }}
|
||||
|
||||
redisExporter:
|
||||
enabled: {{ .Values.redisReplication.redisExporter.enabled }}
|
||||
image: "{{ .Values.redisReplication.redisExporter.image.repository }}:{{ .Values.redisReplication.redisExporter.image.tag }}"
|
||||
41
charts/redis-replication/templates/redis-sentinel.yaml
Normal file
41
charts/redis-replication/templates/redis-sentinel.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
{{- if .Values.redisSentinel.enabled }}
|
||||
---
|
||||
apiVersion: redis.redis.opstreelabs.in/v1beta2
|
||||
kind: RedisSentinel
|
||||
metadata:
|
||||
name: {{ include "redis.sentinelName" . }}
|
||||
namespace: {{ include "redis.namespace" . }}
|
||||
labels:
|
||||
{{- include "redis.labels" . | nindent 4 }}
|
||||
{{- include "redis.sentinelSelectorLabels" . | nindent 4 }}
|
||||
spec:
|
||||
clusterSize: {{ .Values.redisSentinel.clusterSize }}
|
||||
|
||||
podSecurityContext:
|
||||
{{- with .Values.redisSentinel.podSecurityContext }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{ end }}
|
||||
|
||||
redisSentinelConfig:
|
||||
redisReplicationName: {{ include "redis.replicationName" . }}
|
||||
{{ if .Values.existingSecret.enabled }}
|
||||
redisReplicationPassword:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.existingSecret.name }}
|
||||
key: {{ .Values.existingSecret.key }}
|
||||
{{ end }}
|
||||
|
||||
kubernetesConfig:
|
||||
image: "{{ .Values.redisSentinel.image.repository }}:{{ .Values.redisSentinel.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.redisSentinel.image.pullPolicy }}
|
||||
resources:
|
||||
{{- with .Values.redisSentinel.resources }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Values.existingSecret.enabled }}
|
||||
redisSecret:
|
||||
name: {{ .Values.existingSecret.name }}
|
||||
key: {{ .Values.existingSecret.key }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
74
charts/redis-replication/values.yaml
Normal file
74
charts/redis-replication/values.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
# -- Override the name of the resources
|
||||
replicationNameOverride: ""
|
||||
sentinelNameOverride: ""
|
||||
|
||||
# -- Override the namespace of the chart
|
||||
namespaceOverride: ""
|
||||
|
||||
# -- Password
|
||||
existingSecret:
|
||||
enabled: false
|
||||
name: secret-name
|
||||
key: password
|
||||
|
||||
# -- Add additional labels
|
||||
additionalLabels: {}
|
||||
|
||||
# -- Redis Replication settings
|
||||
redisReplication:
|
||||
clusterSize: 3
|
||||
|
||||
# -- Security
|
||||
podSecurityContext:
|
||||
runAsUser: 1000
|
||||
fsGroup: 1000
|
||||
|
||||
# -- Image
|
||||
image:
|
||||
repository: quay.io/opstree/redis
|
||||
tag: v8.4.0
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# -- Resources
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 128Mi
|
||||
|
||||
# -- Storage
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: ceph-block
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
# -- Metrics
|
||||
redisExporter:
|
||||
enabled: true
|
||||
image:
|
||||
repository: quay.io/opstree/redis-exporter
|
||||
tag: v1.80.1
|
||||
|
||||
# -- Redis Sentinel settings
|
||||
redisSentinel:
|
||||
enabled: false
|
||||
clusterSize: 3
|
||||
|
||||
# -- Security
|
||||
podSecurityContext:
|
||||
runAsUser: 1000
|
||||
fsGroup: 1000
|
||||
|
||||
# -- Image
|
||||
image:
|
||||
repository: quay.io/opstree/redis-sentinel
|
||||
tag: v8.4.0
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# -- Resources
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 128Mi
|
||||
@@ -6,44 +6,51 @@
|
||||
":rebaseStalePrs"
|
||||
],
|
||||
"timezone": "US/Central",
|
||||
"schedule": [ "* */1 * * *" ],
|
||||
"labels": [],
|
||||
"prHourlyLimit": 0,
|
||||
"prConcurrentLimit": 0,
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Label charts",
|
||||
"matchDatasources": [
|
||||
"helm"
|
||||
],
|
||||
"addLabels": [
|
||||
"chart"
|
||||
],
|
||||
"automerge": false
|
||||
"matchDatasources": ["helm"],
|
||||
"addLabels": ["chart"],
|
||||
"automerge": false,
|
||||
"bumpVersions": [
|
||||
{
|
||||
"filePatterns": ["{{packageFileDir}}/Chart.{yaml,yml}"],
|
||||
"matchStrings": ["version:\\s(?<version>[^\\s]+)"],
|
||||
"bumpType": "{{#if isPatch}}patch{{else}}minor{{/if}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Label images",
|
||||
"matchDatasources": [
|
||||
"docker"
|
||||
],
|
||||
"addLabels": [
|
||||
"image"
|
||||
],
|
||||
"automerge": false
|
||||
"matchDatasources": ["docker"],
|
||||
"addLabels": ["image"],
|
||||
"automerge": false,
|
||||
"bumpVersions": [
|
||||
{
|
||||
"filePatterns": ["{{packageFileDir}}/Chart.{yaml,yml}"],
|
||||
"matchStrings": ["version:\\s(?<version>[^\\s]+)"],
|
||||
"bumpType": "{{#if isPatch}}patch{{else}}minor{{/if}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "CNPG image",
|
||||
"matchDepNames": [
|
||||
"ghcr.io/cloudnative-pg/postgresql"
|
||||
],
|
||||
"matchDatasources": [
|
||||
"docker"
|
||||
],
|
||||
"addLabels": [
|
||||
"image"
|
||||
],
|
||||
"automerge": false,
|
||||
"versioning": "deb"
|
||||
"description": "Automerge generic-device-plugin image on digest",
|
||||
"matchDatasources": ["docker"],
|
||||
"matchDepNames": ["ghcr.io/squat/generic-device-plugin"],
|
||||
"matchUpdateTypes": ["digest"],
|
||||
"addLabels": ["image", "automerge"],
|
||||
"automerge": true,
|
||||
"minimumReleaseAge": "1 days",
|
||||
"bumpVersions": [
|
||||
{
|
||||
"filePatterns": ["{{packageFileDir}}/Chart.{yaml,yml}"],
|
||||
"matchStrings": ["version:\\s(?<version>[^\\s]+)"],
|
||||
"bumpType": "patch"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user