Compare commits
1 Commits
renovate/t
...
8b928d5cec
| Author | SHA1 | Date | |
|---|---|---|---|
|
8b928d5cec
|
86
.gitea/workflows/lint-test-docker-pull.yaml
Normal file
86
.gitea/workflows/lint-test-docker-pull.yaml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
name: lint-test-docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'hosts/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-lint:
|
||||||
|
runs-on: ubuntu-js
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Check Branch Exists
|
||||||
|
id: check-branch-exists
|
||||||
|
uses: GuillaumeFalourd/branch-exists@v1.1
|
||||||
|
with:
|
||||||
|
branch: "${{ github.base_ref }}"
|
||||||
|
|
||||||
|
- name: Branch Does Not Exist
|
||||||
|
if: steps.check-branch-exists.outputs.exists == 'false'
|
||||||
|
run: echo "Branch ${{ github.base_ref }} was not found, likely already merged"
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
|
||||||
|
- name: Lint Docker Compose
|
||||||
|
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||||
|
run: |
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status.
|
||||||
|
|
||||||
|
TARGET_BRANCH="origin/${{ github.base_ref }}"
|
||||||
|
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||||
|
|
||||||
|
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'hosts/**')
|
||||||
|
|
||||||
|
echo ">> Found changed files:"
|
||||||
|
echo "$CHANGED_FILES"
|
||||||
|
|
||||||
|
# For each changed file, find its parent chart directory (the one with compose.yaml).
|
||||||
|
# Then, create a unique list of those directories.
|
||||||
|
CHANGED_COMPOSE=$(echo "$CHANGED_FILES" | while read -r file; do
|
||||||
|
dir=$(dirname "$file")
|
||||||
|
while [[ "$dir" != "." && ! -f "$dir/compose.yaml" ]]; do
|
||||||
|
dir=$(dirname "$dir")
|
||||||
|
done
|
||||||
|
if [[ "$dir" != "." ]]; then
|
||||||
|
echo "$dir"
|
||||||
|
fi
|
||||||
|
done | sort -u)
|
||||||
|
|
||||||
|
if [[ -z "$CHANGED_COMPOSE" ]]; then
|
||||||
|
echo ">> Could not determine changed compose files. This will happen if only files outside a compose file were changed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ">> Running dclint on changed compose files:"
|
||||||
|
echo "$CHANGED_COMPOSE"
|
||||||
|
|
||||||
|
echo "$CHANGED_COMPOSE" | while read -r compose; do
|
||||||
|
echo ">> Linting $compose ..."
|
||||||
|
npx dclint $compose
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: ntfy Failed
|
||||||
|
uses: niniyas/ntfy-action@master
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
|
title: 'Test Failure - Infrastructure'
|
||||||
|
priority: 3
|
||||||
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
|
tags: action,failed
|
||||||
|
details: 'Docker linting on Pull Request for Infrastructure has failed!'
|
||||||
|
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||||
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-docker-pull.yaml", "clear": true}]'
|
||||||
|
image: true
|
||||||
74
.gitea/workflows/lint-test-docker-push.yaml
Normal file
74
.gitea/workflows/lint-test-docker-push.yaml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
name: lint-test-docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'hosts/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-lint:
|
||||||
|
runs-on: ubuntu-js
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
|
||||||
|
- name: Lint Docker Compose
|
||||||
|
run: |
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status.
|
||||||
|
|
||||||
|
TARGET_BRANCH="origin/main"
|
||||||
|
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||||
|
|
||||||
|
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'hosts/**')
|
||||||
|
|
||||||
|
echo ">> Found changed files:"
|
||||||
|
echo "$CHANGED_FILES"
|
||||||
|
|
||||||
|
# For each changed file, find its parent chart directory (the one with compose.yaml).
|
||||||
|
# Then, create a unique list of those directories.
|
||||||
|
CHANGED_COMPOSE=$(echo "$CHANGED_FILES" | while read -r file; do
|
||||||
|
dir=$(dirname "$file")
|
||||||
|
while [[ "$dir" != "." && ! -f "$dir/compose.yaml" ]]; do
|
||||||
|
dir=$(dirname "$dir")
|
||||||
|
done
|
||||||
|
if [[ "$dir" != "." ]]; then
|
||||||
|
echo "$dir"
|
||||||
|
fi
|
||||||
|
done | sort -u)
|
||||||
|
|
||||||
|
if [[ -z "$CHANGED_COMPOSE" ]]; then
|
||||||
|
echo ">> Could not determine changed compose files. This will happen if only files outside a compose file were changed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ">> Running dclint on changed compose files:"
|
||||||
|
echo "$CHANGED_COMPOSE"
|
||||||
|
|
||||||
|
echo "$CHANGED_COMPOSE" | while read -r compose; do
|
||||||
|
echo ">> Linting $compose ..."
|
||||||
|
npx dclint $compose
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: ntfy Failed
|
||||||
|
uses: niniyas/ntfy-action@master
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
|
title: 'Test Failure - Infrastructure'
|
||||||
|
priority: 4
|
||||||
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
|
tags: action,failed
|
||||||
|
details: 'Docker linting on Push for Infrastructure has failed!'
|
||||||
|
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||||
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-docker-push.yaml", "clear": true}]'
|
||||||
|
image: true
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
name: lint-test-docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'hosts/**'
|
|
||||||
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'hosts/**'
|
|
||||||
|
|
||||||
env:
|
|
||||||
BASE_BRANCH: "origin/${{ gitea.base_ref }}"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint-docker-compose:
|
|
||||||
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: "${{ github.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 Node.js
|
|
||||||
if: steps.branch-exists.outputs.exists == 'true'
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: '24'
|
|
||||||
|
|
||||||
- name: Check Directories for Changes
|
|
||||||
id: check-dir-changes
|
|
||||||
if: steps.branch-exists.outputs.exists == 'true'
|
|
||||||
run: |
|
|
||||||
CHANGED_COMPOSE=()
|
|
||||||
|
|
||||||
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)
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
echo ">> Checking for changes from a push ..."
|
|
||||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${GIT_DIFF}" ]; then
|
|
||||||
echo ""
|
|
||||||
echo ">> Changes detected:"
|
|
||||||
echo "$GIT_DIFF"
|
|
||||||
|
|
||||||
for path in $GIT_DIFF; do
|
|
||||||
if echo "$path" | grep -q -E "hosts/[^/]+/[^/]+"; then
|
|
||||||
echo ""
|
|
||||||
echo ">> Adding path: $path"
|
|
||||||
CHANGED_COMPOSE+=$(echo "$path")
|
|
||||||
CHANGED_COMPOSE+=$(echo " ")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
echo ">> No changes detected"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${CHANGED_COMPOSE}" ]; then
|
|
||||||
echo ""
|
|
||||||
echo ">> Compose to Lint:"
|
|
||||||
echo "$(echo "${CHANGED_COMPOSE}" | sort -u)"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
echo "compose-dir<<EOF" >> $GITEA_OUTPUT
|
|
||||||
echo "$(echo "${CHANGED_COMPOSE}" | sort -u)" >> $GITEA_OUTPUT
|
|
||||||
echo "EOF" >> $GITEA_OUTPUT
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
echo ">> Did not find any docker compose files to lint"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Lint Docker Compose
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
env:
|
|
||||||
CHANGED_COMPOSE: ${{ steps.check-dir-changes.outputs.compose-dir }}
|
|
||||||
run: |
|
|
||||||
echo ">> Running dclint on changed compose files:"
|
|
||||||
echo "$CHANGED_COMPOSE"
|
|
||||||
|
|
||||||
for compose in $CHANGED_COMPOSE; do
|
|
||||||
echo ">> Linting $compose ..."
|
|
||||||
npx dclint $compose
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: ntfy Failed
|
|
||||||
uses: niniyas/ntfy-action@master
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
url: '${{ secrets.NTFY_URL }}'
|
|
||||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
|
||||||
title: 'Test Failure - Infrastructure'
|
|
||||||
priority: 3
|
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
||||||
tags: action,failed
|
|
||||||
details: 'Docker linting on Pull Request for Infrastructure has failed!'
|
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-docker-pull.yaml", "clear": true}]'
|
|
||||||
image: true
|
|
||||||
94
.gitea/workflows/lint-test-helm-pull.yaml
Normal file
94
.gitea/workflows/lint-test-helm-pull.yaml
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
name: lint-test-helm
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'clusters/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
helm-lint:
|
||||||
|
runs-on: ubuntu-js
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Check Branch Exists
|
||||||
|
id: check-branch-exists
|
||||||
|
uses: GuillaumeFalourd/branch-exists@v1.1
|
||||||
|
with:
|
||||||
|
branch: ${{ github.base_ref }}
|
||||||
|
|
||||||
|
- name: Branch Does Not Exist
|
||||||
|
if: steps.check-branch-exists.outputs.exists == 'false'
|
||||||
|
run: echo "Branch ${{ github.base_ref }} was not found, likely already merged"
|
||||||
|
|
||||||
|
- name: Set up Helm
|
||||||
|
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||||
|
uses: azure/setup-helm@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
version: v3.19.2
|
||||||
|
|
||||||
|
- name: Lint Helm Chart
|
||||||
|
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||||
|
run: |
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status.
|
||||||
|
|
||||||
|
TARGET_BRANCH="origin/${{ github.base_ref }}"
|
||||||
|
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||||
|
|
||||||
|
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'clusters/**')
|
||||||
|
|
||||||
|
echo ">> Found changed files:"
|
||||||
|
echo "$CHANGED_FILES"
|
||||||
|
|
||||||
|
# For each changed file, find its parent chart directory (the one with Chart.yaml).
|
||||||
|
# Then, create a unique list of those directories.
|
||||||
|
CHANGED_CHARTS=$(echo "$CHANGED_FILES" | while read -r file; do
|
||||||
|
dir=$(dirname "$file")
|
||||||
|
while [[ "$dir" != "." && ! -f "$dir/Chart.yaml" ]]; do
|
||||||
|
dir=$(dirname "$dir")
|
||||||
|
done
|
||||||
|
if [[ "$dir" != "." ]]; then
|
||||||
|
echo "$dir"
|
||||||
|
fi
|
||||||
|
done | sort -u)
|
||||||
|
|
||||||
|
if [[ -z "$CHANGED_CHARTS" ]]; then
|
||||||
|
echo ">> Could not determine changed charts. This could happen if only files outside a chart were changed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ">> Running helm lint on changed charts:"
|
||||||
|
echo "$CHANGED_CHARTS"
|
||||||
|
|
||||||
|
echo "$CHANGED_CHARTS" | while read -r chart; do
|
||||||
|
helm dependency list --max-col-width 120 $chart 2> /dev/null \
|
||||||
|
| tail +2 | head -n -1 \
|
||||||
|
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||||
|
| while read cmd; do echo "$cmd" | sh; done || true
|
||||||
|
|
||||||
|
echo ">> Building dependency for "$chart" ..."
|
||||||
|
helm dependency build "$chart"
|
||||||
|
echo ">> Linting $chart..."
|
||||||
|
helm lint "$chart"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: ntfy Failed
|
||||||
|
uses: niniyas/ntfy-action@master
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
|
title: 'Test Failure - Infrastructure'
|
||||||
|
priority: 3
|
||||||
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
|
tags: action,failed
|
||||||
|
details: 'Helm linting on Pull Request for Infrastructure has failed!'
|
||||||
|
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||||
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-helm-pull.yaml", "clear": true}]'
|
||||||
|
image: true
|
||||||
80
.gitea/workflows/lint-test-helm-push.yaml
Normal file
80
.gitea/workflows/lint-test-helm-push.yaml
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
name: lint-test-helm
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'clusters/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
helm-lint:
|
||||||
|
runs-on: ubuntu-js
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Helm
|
||||||
|
uses: azure/setup-helm@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
version: v3.19.2
|
||||||
|
|
||||||
|
- name: Lint Helm Chart
|
||||||
|
run: |
|
||||||
|
TARGET_BRANCH="origin/main"
|
||||||
|
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||||
|
|
||||||
|
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'clusters/**')
|
||||||
|
|
||||||
|
echo ">> Found changed files:"
|
||||||
|
echo "$CHANGED_FILES"
|
||||||
|
|
||||||
|
# For each changed file, find its parent chart directory (the one with Chart.yaml).
|
||||||
|
# Then, create a unique list of those directories.
|
||||||
|
CHANGED_CHARTS=$(echo "$CHANGED_FILES" | while read -r file; do
|
||||||
|
dir=$(dirname "$file")
|
||||||
|
while [[ "$dir" != "." && ! -f "$dir/Chart.yaml" ]]; do
|
||||||
|
dir=$(dirname "$dir")
|
||||||
|
done
|
||||||
|
if [[ "$dir" != "." ]]; then
|
||||||
|
echo "$dir"
|
||||||
|
fi
|
||||||
|
done | sort -u)
|
||||||
|
|
||||||
|
if [[ -z "$CHANGED_CHARTS" ]]; then
|
||||||
|
echo ">> Could not determine changed charts. This could happen if only files outside a chart were changed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ">> Running helm lint on changed charts:"
|
||||||
|
echo "$CHANGED_CHARTS"
|
||||||
|
|
||||||
|
echo "$CHANGED_CHARTS" | while read -r chart; do
|
||||||
|
helm dependency list --max-col-width 120 $chart 2> /dev/null \
|
||||||
|
| tail +2 | head -n -1 \
|
||||||
|
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||||
|
| while read cmd; do echo "$cmd" | sh; done || true
|
||||||
|
|
||||||
|
echo ">> Building dependency for "$chart" ..."
|
||||||
|
helm dependency build "$chart"
|
||||||
|
echo ">> Linting $chart..."
|
||||||
|
helm lint "$chart"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: ntfy Failed
|
||||||
|
uses: niniyas/ntfy-action@master
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
|
title: 'Test Failure - Infrastructure'
|
||||||
|
priority: 4
|
||||||
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
|
tags: action,failed
|
||||||
|
details: 'Helm linting on Push for Infrastructure has failed!'
|
||||||
|
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||||
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-helm-push.yaml", "clear": true}]'
|
||||||
|
image: true
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
name: lint-test-helm
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'clusters/cl01tl/helm/**'
|
|
||||||
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'clusters/cl01tl/helm/**'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CLUSTER: cl01tl
|
|
||||||
BASE_BRANCH: "origin/${{ gitea.base_ref }}"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
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
|
|
||||||
if: steps.branch-exists.outputs.exists == 'true'
|
|
||||||
uses: azure/setup-helm@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
version: v3.19.2
|
|
||||||
|
|
||||||
- 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)
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
echo ">> Checking for changes from a push ..."
|
|
||||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${GIT_DIFF}" ]; then
|
|
||||||
echo ""
|
|
||||||
echo ">> Changes detected:"
|
|
||||||
echo "$GIT_DIFF"
|
|
||||||
|
|
||||||
for path in $GIT_DIFF; do
|
|
||||||
if echo "$path" | grep -q -E "clusters/[^/]+/helm/[^/]+"; then
|
|
||||||
echo ""
|
|
||||||
echo ">> Adding path: $path"
|
|
||||||
CHANGED_CHARTS+=$(echo "$path" | awk -F '/' '{print $4}')
|
|
||||||
CHANGED_CHARTS+=$(echo "\n")
|
|
||||||
fi
|
|
||||||
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 ""
|
|
||||||
echo ">> Did not find any helm charts files to lint"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
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 clusters/${CLUSTER}/helm/$dir 2> /dev/null \
|
|
||||||
| tail +2 | head -n -1 \
|
|
||||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
|
||||||
| while read cmd; do
|
|
||||||
if [[ "$cmd" == "*oci://*" ]]; then
|
|
||||||
echo ">> Ignoring OCI repo"
|
|
||||||
else
|
|
||||||
echo ">> Command: $cmd"
|
|
||||||
echo "$cmd" | sh;
|
|
||||||
fi
|
|
||||||
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=clusters/${CLUSTER}/helm/$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 - Infrastructure'
|
|
||||||
priority: 3
|
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
||||||
tags: action,failed
|
|
||||||
details: 'Helm linting on Pull Request for Infrastructure has failed!'
|
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-helm-pull.yaml", "clear": true}]'
|
|
||||||
image: true
|
|
||||||
@@ -1,433 +0,0 @@
|
|||||||
name: render-manifests-automerge
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'clusters/cl01tl/helm/**'
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
|
|
||||||
env:
|
|
||||||
CLUSTER: cl01tl
|
|
||||||
BASE_BRANCH: manifests
|
|
||||||
BRANCH_NAME_BASE: auto/update-manifests-automerge
|
|
||||||
MAIN_DIR: /workspace/alexlebens/infrastructure/infrastructure
|
|
||||||
MANIFEST_DIR: /workspace/alexlebens/infrastructure/infrastructure-manifests
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
render-manifests-automerge:
|
|
||||||
runs-on: ubuntu-js
|
|
||||||
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'automerge')) }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout Main
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
path: infrastructure
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Checkout Manifests
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: manifests
|
|
||||||
path: infrastructure-manifests
|
|
||||||
|
|
||||||
- name: Set up Helm
|
|
||||||
uses: azure/setup-helm@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
version: v3.17.2 # Pending https://github.com/helm/helm/pull/30743
|
|
||||||
|
|
||||||
- name: Prepare Manifest Branch
|
|
||||||
id: prepare-manifest-branch
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
BRANCH_NAME="${BRANCH_NAME_BASE}-$(date +%Y%m%d%H%M%S)"
|
|
||||||
|
|
||||||
echo ">> Configure git to use gitea-bot as user ..."
|
|
||||||
git config user.name "gitea-bot"
|
|
||||||
git config user.email "gitea-bot@alexlebens.net"
|
|
||||||
|
|
||||||
echo ">> Creating branch ..."
|
|
||||||
git checkout -b $BRANCH_NAME
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
- name: Check which Directories have Changes
|
|
||||||
id: check-dir-changes
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
RENDER_DIR=()
|
|
||||||
|
|
||||||
echo ">> Checking for changes from HEAD^..HEAD ..."
|
|
||||||
GIT_DIFF=$(git diff --name-only HEAD^..HEAD | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
|
||||||
|
|
||||||
if [ -n "${GIT_DIFF}" ]; then
|
|
||||||
echo ">> Changes detected:"
|
|
||||||
echo "$GIT_DIFF"
|
|
||||||
for path in $GIT_DIFF; do
|
|
||||||
RENDER_DIR+=$(echo "$path" | awk -F '/' '{print $4}')
|
|
||||||
RENDER_DIR+=$(echo " ")
|
|
||||||
done
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> No changes detected"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${RENDER_DIR}" ]; then
|
|
||||||
echo ">> Directories to Render:"
|
|
||||||
echo "$(echo "${RENDER_DIR}" | sort -u)"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
echo "render-dir<<EOF" >> $GITEA_OUTPUT
|
|
||||||
echo "$(echo "${RENDER_DIR}" | 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:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
echo ">> Adding repositories for chart dependencies ..."
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
helm dependency list --max-col-width 120 ${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir 2> /dev/null \
|
|
||||||
| tail +2 | head -n -1 \
|
|
||||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
|
||||||
| while read cmd; do
|
|
||||||
if [[ "$cmd" == "*oci://*" ]]; then
|
|
||||||
echo ">> Ignoring OCI repo"
|
|
||||||
else
|
|
||||||
echo "$cmd" | sh;
|
|
||||||
fi
|
|
||||||
done || true
|
|
||||||
done
|
|
||||||
|
|
||||||
if helm repo list | tail +2 | read -r; then
|
|
||||||
echo ">> Update repository cache ..."
|
|
||||||
helm repo update
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Remove Changed Manifest Files
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
env:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Remove manfiest files and rebuild from source ..."
|
|
||||||
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
chart_path=${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$dir
|
|
||||||
|
|
||||||
echo "$chart_path"
|
|
||||||
rm -rf $chart_path/*
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Render Helm Manifests
|
|
||||||
id: render-manifests
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
env:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
echo ">> Rendering Manifests ..."
|
|
||||||
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
|
||||||
chart_name=$(basename "$chart_path")
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo ">> Rendering chart: $chart_name"
|
|
||||||
echo ">> Chart path $chart_path"
|
|
||||||
|
|
||||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
|
||||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
|
||||||
TEMPLATE=""
|
|
||||||
|
|
||||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
|
||||||
|
|
||||||
cd $chart_path
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Updating helm dependency ..."
|
|
||||||
helm dependency update --skip-refresh
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Building helm dependency ..."
|
|
||||||
helm dependency build --skip-refresh
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Linting helm ..."
|
|
||||||
helm lint --namespace "$chart_name"
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Rendering templates ..."
|
|
||||||
case "$chart_name" in
|
|
||||||
"stack")
|
|
||||||
echo ""
|
|
||||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
|
||||||
echo ""
|
|
||||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo ""
|
|
||||||
echo ">> Standard Rendering for $chart_name ..."
|
|
||||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Formating rendered template ..."
|
|
||||||
echo "$TEMPLATE" | yq '... comments=""' | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
|
||||||
|
|
||||||
# Strip comments again to ensure formatting correctness
|
|
||||||
for file in "$OUTPUT_FOLDER"/*; do
|
|
||||||
yq -i '... comments=""' $file
|
|
||||||
done
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
|
||||||
ls $OUTPUT_FOLDER
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
echo ">> Directory $chart_path does not contain a Chart.yaml. Skipping ..."
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Check for Changes
|
|
||||||
id: check-changes
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
GIT_CHANGES=$(git status --porcelain)
|
|
||||||
|
|
||||||
if [ -n "$GIT_CHANGES" ]; then
|
|
||||||
echo ">> Changes detected"
|
|
||||||
git status --porcelain
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> No changes detected, skipping PR creation"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Commit and Push Changes
|
|
||||||
id: commit-push
|
|
||||||
if: steps.check-changes.outputs.changes-detected == 'true'
|
|
||||||
env:
|
|
||||||
BRANCH_NAME: ${{ steps.prepare-manifest-branch.outputs.BRANCH_NAME }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Commiting changes to ${BRANCH_NAME} ..."
|
|
||||||
git add .
|
|
||||||
git commit -m "chore: Update manifests after automerge"
|
|
||||||
|
|
||||||
REPO_URL="${{ secrets.REPO_URL }}/${{ gitea.repository }}"
|
|
||||||
echo ">> Pushing changes to $REPO_URL ..."
|
|
||||||
git push -u "https://oauth2:${{ secrets.BOT_TOKEN }}@$(echo $REPO_URL | sed -e 's|https://||')" ${BRANCH_NAME}
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "push=true" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
id: create-pull-request
|
|
||||||
if: steps.commit-push.outputs.push == 'true'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
||||||
GITEA_URL: ${{ secrets.REPO_URL }}
|
|
||||||
BRANCH_NAME: ${{ steps.prepare-manifest-branch.outputs.BRANCH_NAME }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
API_ENDPOINT="${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/pulls"
|
|
||||||
|
|
||||||
PAYLOAD=$( jq -n \
|
|
||||||
--arg head "${BRANCH_NAME}" \
|
|
||||||
--arg base "${BASE_BRANCH}" \
|
|
||||||
--arg title "Automated Manifest Update - Automerge" \
|
|
||||||
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow. This is expected to be automerged." \
|
|
||||||
'{head: $head, base: $base, title: $title, body: $body}' )
|
|
||||||
|
|
||||||
echo ">> Creating PR from branch ${BRANCH_NAME} into ${BASE_BRANCH}"
|
|
||||||
echo ">> With Endpoint of:"
|
|
||||||
echo "$API_ENDPOINT"
|
|
||||||
echo ">> With Payload of:"
|
|
||||||
echo "$PAYLOAD"
|
|
||||||
|
|
||||||
HTTP_STATUS=$(
|
|
||||||
curl -X POST \
|
|
||||||
--silent \
|
|
||||||
--write-out '%{http_code}' \
|
|
||||||
--output response_body.json \
|
|
||||||
--dump-header response_headers.txt \
|
|
||||||
--data "$PAYLOAD" \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"$API_ENDPOINT" 2> response_errors.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
echo ">> HTTP Status Code: $HTTP_STATUS"
|
|
||||||
echo ">> Response Output ..."
|
|
||||||
echo "----"
|
|
||||||
cat response_body.json
|
|
||||||
echo "----"
|
|
||||||
cat response_headers.txt
|
|
||||||
echo "----"
|
|
||||||
cat response_errors.txt
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
if [ "$HTTP_STATUS" == "201" ]; then
|
|
||||||
echo ">> Pull Request created successfully!"
|
|
||||||
|
|
||||||
PR_URL=$(cat response_body.json | jq -r .html_url)
|
|
||||||
echo ">> Pull Request URL: $PR_URL"
|
|
||||||
echo "pull-request-url=${PR_URL}" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
PR_NUMBER=$(cat response_body.json | jq -r .number)
|
|
||||||
echo ">> Pull Request Number: $PR_NUMBER"
|
|
||||||
echo "pull-request-number=${PR_NUMBER}" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
echo "pull-request-operation=created" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "422" ]; then
|
|
||||||
echo ">> Failed to create PR (HTTP 422: Unprocessable Entity), PR may already exist"
|
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "409" ]; then
|
|
||||||
echo ">> Failed to create PR (HTTP 409: Conflict), PR already exists"
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> Failed to create PR, HTTP status code: $HTTP_STATUS"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Merge Changes
|
|
||||||
id: merge-changes
|
|
||||||
if: steps.commit-push.outputs.push == 'true'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
||||||
GITEA_URL: ${{ secrets.REPO_URL }}
|
|
||||||
BRANCH_NAME: ${{ steps.prepare-manifest-branch.outputs.BRANCH_NAME }}
|
|
||||||
PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
API_ENDPOINT="${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/pulls/${PR_NUMBER}/merge"
|
|
||||||
|
|
||||||
PAYLOAD=$( jq -n \
|
|
||||||
--arg Do "merge" \
|
|
||||||
'{Do: $Do}' )
|
|
||||||
|
|
||||||
echo ">> Merging PR with ID: ${PR_NUMBER}"
|
|
||||||
echo ">> With Endpoint of:"
|
|
||||||
echo "$API_ENDPOINT"
|
|
||||||
echo ">> With Payload of:"
|
|
||||||
echo "$PAYLOAD"
|
|
||||||
|
|
||||||
HTTP_STATUS=$(
|
|
||||||
curl -X POST \
|
|
||||||
--silent \
|
|
||||||
--write-out '%{http_code}' \
|
|
||||||
--output response_body.json \
|
|
||||||
--dump-header response_headers.txt \
|
|
||||||
--data "$PAYLOAD" \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"$API_ENDPOINT" 2> response_errors.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
echo ">> HTTP Status Code: $HTTP_STATUS"
|
|
||||||
echo ">> Response Output ..."
|
|
||||||
echo "----"
|
|
||||||
cat response_body.json
|
|
||||||
echo "----"
|
|
||||||
cat response_headers.txt
|
|
||||||
echo "----"
|
|
||||||
cat response_errors.txt
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
if [ "$HTTP_STATUS" == "200" ]; then
|
|
||||||
echo ">> Pull Request merged successfully!"
|
|
||||||
echo "pull-request-operation=merged" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> Failed to create PR, HTTP status code: $HTTP_STATUS"
|
|
||||||
echo "pull-request-operation=failed" >> $GITEA_OUTPUT
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Cleanup Branch
|
|
||||||
if: failure()
|
|
||||||
env:
|
|
||||||
BRANCH_NAME: ${{ steps.prepare-manifest-branch.outputs.BRANCH_NAME }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Removing branch: ${BRANCH_NAME}"
|
|
||||||
git push origin --delete ${BRANCH_NAME}
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: ntfy Merged
|
|
||||||
uses: niniyas/ntfy-action@master
|
|
||||||
if: steps.merge-changes.outputs.pull-request-operation == 'merged'
|
|
||||||
with:
|
|
||||||
url: "${{ secrets.NTFY_URL }}"
|
|
||||||
topic: "${{ secrets.NTFY_TOPIC }}"
|
|
||||||
title: "Manifest Render PR Merged - Infrastructure"
|
|
||||||
priority: 3
|
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
||||||
tags: action,successfully,completed
|
|
||||||
details: "Automerge Manifest rendering for Infrastructure!"
|
|
||||||
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "${{ steps.create-pull-request.outputs.pull-request-url }}", "clear": true}]'
|
|
||||||
|
|
||||||
- name: ntfy Failed
|
|
||||||
uses: niniyas/ntfy-action@master
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
url: "${{ secrets.NTFY_URL }}"
|
|
||||||
topic: "${{ secrets.NTFY_TOPIC }}"
|
|
||||||
title: "Manifest Render Failure - Infrastructure"
|
|
||||||
priority: 4
|
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
||||||
tags: action,failed
|
|
||||||
details: "Automerge Manifest rendering for Infrastructure has failed!"
|
|
||||||
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=render-manifests-automerge.yaml", "clear": true}]'
|
|
||||||
image: true
|
|
||||||
@@ -1,418 +0,0 @@
|
|||||||
name: render-manifests-merge
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'clusters/cl01tl/helm/**'
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
|
|
||||||
env:
|
|
||||||
CLUSTER: cl01tl
|
|
||||||
BASE_BRANCH: manifests
|
|
||||||
BRANCH_NAME: auto/update-manifests
|
|
||||||
ASSIGNEE: alexlebens
|
|
||||||
MAIN_DIR: /workspace/alexlebens/infrastructure/infrastructure
|
|
||||||
MANIFEST_DIR: /workspace/alexlebens/infrastructure/infrastructure-manifests
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
render-manifests-merge:
|
|
||||||
runs-on: ubuntu-js
|
|
||||||
if: ${{ (github.event.pull_request.merged == true) && !(contains(github.event.pull_request.labels.*.name, 'automerge')) }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout Main
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
path: infrastructure
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Checkout Manifests
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: manifests
|
|
||||||
path: infrastructure-manifests
|
|
||||||
|
|
||||||
- name: Set up Helm
|
|
||||||
uses: azure/setup-helm@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
version: v3.17.2 # Pending https://github.com/helm/helm/pull/30743
|
|
||||||
|
|
||||||
- name: Prepare Manifest Branch
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Configure git to use gitea-bot as user ..."
|
|
||||||
git config user.name "gitea-bot"
|
|
||||||
git config user.email "gitea-bot@alexlebens.net"
|
|
||||||
|
|
||||||
echo ">> Checking if PR branch exists ..."
|
|
||||||
if [[ $(git ls-remote --heads origin "${BRANCH_NAME}" | wc -l) -gt 0 ]]; then
|
|
||||||
echo ">> Branch '${BRANCH_NAME}' exists, pulling changes ..."
|
|
||||||
git fetch origin "${BRANCH_NAME}"
|
|
||||||
git checkout "${BRANCH_NAME}"
|
|
||||||
git pull --rebase
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> Branch '${BRANCH_NAME}' does not exist, creating ..."
|
|
||||||
git checkout -b $BRANCH_NAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Check which Directories have Changes
|
|
||||||
id: check-dir-changes
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
RENDER_DIR=()
|
|
||||||
|
|
||||||
echo ">> Checking for changes from HEAD^..HEAD ..."
|
|
||||||
GIT_DIFF=$(git diff --name-only HEAD^..HEAD | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
|
||||||
|
|
||||||
if [ -n "${GIT_DIFF}" ]; then
|
|
||||||
echo ">> Changes detected:"
|
|
||||||
echo "$GIT_DIFF"
|
|
||||||
for path in $GIT_DIFF; do
|
|
||||||
RENDER_DIR+=$(echo "$path" | awk -F '/' '{print $4}')
|
|
||||||
RENDER_DIR+=$(echo " ")
|
|
||||||
done
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> No changes detected"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${RENDER_DIR}" ]; then
|
|
||||||
echo ">> Directories to Render:"
|
|
||||||
echo "$(echo "${RENDER_DIR}" | sort -u)"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
echo "render-dir<<EOF" >> $GITEA_OUTPUT
|
|
||||||
echo "$(echo "${RENDER_DIR}" | 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:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
echo ">> Adding repositories for chart dependencies ..."
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
helm dependency list --max-col-width 120 ${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir 2> /dev/null \
|
|
||||||
| tail +2 | head -n -1 \
|
|
||||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
|
||||||
| while read cmd; do
|
|
||||||
if [[ "$cmd" == "*oci://*" ]]; then
|
|
||||||
echo ">> Ignoring OCI repo"
|
|
||||||
else
|
|
||||||
echo "$cmd" | sh;
|
|
||||||
fi
|
|
||||||
done || true
|
|
||||||
done
|
|
||||||
|
|
||||||
if helm repo list | tail +2 | read -r; then
|
|
||||||
echo ">> Update repository cache ..."
|
|
||||||
helm repo update
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Remove Changed Manifest Files
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
env:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Remove manfiest files and rebuild from source ..."
|
|
||||||
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
chart_path=${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$dir
|
|
||||||
|
|
||||||
echo "$chart_path"
|
|
||||||
rm -rf $chart_path/*
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Render Helm Manifests
|
|
||||||
id: render-manifests
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
env:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
echo ">> Rendering Manifests ..."
|
|
||||||
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
|
||||||
chart_name=$(basename "$chart_path")
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo ">> Rendering chart: $chart_name"
|
|
||||||
echo ">> Chart path $chart_path"
|
|
||||||
|
|
||||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
|
||||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
|
||||||
TEMPLATE=""
|
|
||||||
|
|
||||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
|
||||||
|
|
||||||
cd $chart_path
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Updating helm dependency ..."
|
|
||||||
helm dependency update --skip-refresh
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Building helm dependency ..."
|
|
||||||
helm dependency build --skip-refresh
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Linting helm ..."
|
|
||||||
helm lint --namespace "$chart_name"
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Rendering templates ..."
|
|
||||||
case "$chart_name" in
|
|
||||||
"stack")
|
|
||||||
echo ""
|
|
||||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
|
||||||
echo ""
|
|
||||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo ""
|
|
||||||
echo ">> Standard Rendering for $chart_name ..."
|
|
||||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Formating rendered template ..."
|
|
||||||
echo "$TEMPLATE" | yq '... comments=""' | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
|
||||||
|
|
||||||
# Strip comments again to ensure formatting correctness
|
|
||||||
for file in "$OUTPUT_FOLDER"/*; do
|
|
||||||
yq -i '... comments=""' $file
|
|
||||||
done
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
|
||||||
ls $OUTPUT_FOLDER
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
echo ">> Directory $chart_path does not contain a Chart.yaml. Skipping ..."
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Check for Changes
|
|
||||||
id: check-changes
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
GIT_CHANGES=$(git status --porcelain)
|
|
||||||
|
|
||||||
if [ -n "$GIT_CHANGES" ]; then
|
|
||||||
echo ">> Changes detected"
|
|
||||||
git status --porcelain
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> No changes detected, skipping PR creation"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Commit and Push Changes
|
|
||||||
id: commit-push
|
|
||||||
if: steps.check-changes.outputs.changes-detected == 'true'
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Commiting changes to ${BRANCH_NAME} ..."
|
|
||||||
git add .
|
|
||||||
git commit -m "chore: Update manifests after change"
|
|
||||||
|
|
||||||
REPO_URL="${{ secrets.REPO_URL }}/${{ gitea.repository }}"
|
|
||||||
echo ">> Pushing changes to $REPO_URL ..."
|
|
||||||
git push -u "https://oauth2:${{ secrets.BOT_TOKEN }}@$(echo $REPO_URL | sed -e 's|https://||')" ${BRANCH_NAME}
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "HEAD_BRANCH=${BRANCH_NAME}" >> $GITEA_OUTPUT
|
|
||||||
echo "push=true" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
- name: Check for Pull Request
|
|
||||||
id: check-for-pull-requst
|
|
||||||
if: steps.commit-push.outputs.push == 'true'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
||||||
GITEA_URL: ${{ secrets.REPO_URL }}
|
|
||||||
HEAD_BRANCH: ${{ steps.commit-push.outputs.HEAD_BRANCH }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
API_ENDPOINT="${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/pulls?base_branch=${BASE_BRANCH}&state=open&page=1"
|
|
||||||
|
|
||||||
echo ">> Checking if PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
|
||||||
echo ">> With Endpoint of:"
|
|
||||||
echo "$API_ENDPOINT"
|
|
||||||
|
|
||||||
HTTP_STATUS=$(
|
|
||||||
curl -X GET \
|
|
||||||
--silent \
|
|
||||||
--write-out '%{http_code}' \
|
|
||||||
--output response_body.json \
|
|
||||||
--dump-header response_headers.txt \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"$API_ENDPOINT" 2> response_errors.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
echo ">> HTTP Status Code: $HTTP_STATUS"
|
|
||||||
echo ">> Response Output ..."
|
|
||||||
echo "----"
|
|
||||||
cat response_body.json
|
|
||||||
echo "----"
|
|
||||||
cat response_headers.txt
|
|
||||||
echo "----"
|
|
||||||
cat response_errors.txt
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
if [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .[0].state)" == "open" ]; then
|
|
||||||
echo ">> Pull Request has been found open, will update"
|
|
||||||
PR_INDEX=$(cat response_body.json | jq -r .[0].number)
|
|
||||||
echo "pull-request-exists=${PR_INDEX}" >> $GITEA_OUTPUT
|
|
||||||
echo "pull-request-index=true" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .[0].state)" == "closed" ]; then
|
|
||||||
echo ">> Pull Request found, but was closed"
|
|
||||||
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> Pull Request not found"
|
|
||||||
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
id: create-pull-request
|
|
||||||
if: steps.commit-push.outputs.push == 'true' && steps.check-for-pull-requst.outputs.pull-request-exists == 'false'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
||||||
GITEA_URL: ${{ secrets.REPO_URL }}
|
|
||||||
HEAD_BRANCH: ${{ steps.commit-push.outputs.HEAD_BRANCH }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
API_ENDPOINT="${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/pulls"
|
|
||||||
|
|
||||||
PAYLOAD=$( jq -n \
|
|
||||||
--arg head "${HEAD_BRANCH}" \
|
|
||||||
--arg base "${BASE_BRANCH}" \
|
|
||||||
--arg assignee "${ASSIGNEE}" \
|
|
||||||
--arg title "Automated Manifest Update" \
|
|
||||||
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow." \
|
|
||||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body}' )
|
|
||||||
|
|
||||||
echo ">> Creating PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
|
||||||
echo ">> With Endpoint of:"
|
|
||||||
echo "$API_ENDPOINT"
|
|
||||||
echo ">> With Payload of:"
|
|
||||||
echo "$PAYLOAD"
|
|
||||||
|
|
||||||
HTTP_STATUS=$(
|
|
||||||
curl -X POST \
|
|
||||||
--silent \
|
|
||||||
--write-out '%{http_code}' \
|
|
||||||
--output response_body.json \
|
|
||||||
--dump-header response_headers.txt \
|
|
||||||
--data "$PAYLOAD" \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"$API_ENDPOINT" 2> response_errors.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
echo ">> HTTP Status Code: $HTTP_STATUS"
|
|
||||||
echo ">> Response Output ..."
|
|
||||||
echo "----"
|
|
||||||
cat response_body.json
|
|
||||||
echo "----"
|
|
||||||
cat response_headers.txt
|
|
||||||
echo "----"
|
|
||||||
cat response_errors.txt
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
if [ "$HTTP_STATUS" == "201" ]; then
|
|
||||||
echo ">> Pull Request created successfully!"
|
|
||||||
PR_URL=$(cat response_body.json | jq -r .html_url)
|
|
||||||
echo "pull-request-url=${PR_URL}" >> $GITEA_OUTPUT
|
|
||||||
PR_ID=$(cat response_body.json | jq -r .id)
|
|
||||||
echo "pull-request-id=${PR_ID}" >> $GITEA_OUTPUT
|
|
||||||
echo "pull-request-operation=created" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "422" ]; then
|
|
||||||
echo ">> Failed to create PR (HTTP 422: Unprocessable Entity), PR may already exist"
|
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "409" ]; then
|
|
||||||
echo ">> Failed to create PR (HTTP 409: Conflict), PR already exists"
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> Failed to create PR, HTTP status code: $HTTP_STATUS"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: ntfy Created
|
|
||||||
uses: niniyas/ntfy-action@master
|
|
||||||
if: steps.create-pull-request.outputs.pull-request-operation == 'created'
|
|
||||||
with:
|
|
||||||
url: "${{ secrets.NTFY_URL }}"
|
|
||||||
topic: "${{ secrets.NTFY_TOPIC }}"
|
|
||||||
title: "Manifest Render PR Created - Infrastructure"
|
|
||||||
priority: 3
|
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
||||||
tags: action,successfully,completed
|
|
||||||
details: "Manifest rendering for Infrastructure has created a new Pull Request with ID: ${{ steps.create-pull-request.outputs.pull-request-id }}!"
|
|
||||||
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "${{ steps.create-pull-request.outputs.pull-request-url }}", "clear": true}]'
|
|
||||||
|
|
||||||
- name: ntfy Failed
|
|
||||||
uses: niniyas/ntfy-action@master
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
url: "${{ secrets.NTFY_URL }}"
|
|
||||||
topic: "${{ secrets.NTFY_TOPIC }}"
|
|
||||||
title: "Manifest Render Failure - Infrastructure"
|
|
||||||
priority: 4
|
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
||||||
tags: action,failed
|
|
||||||
details: "Manifest rendering for Infrastructure has failed!"
|
|
||||||
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=render-manifests.yaml", "clear": true}]'
|
|
||||||
image: true
|
|
||||||
@@ -1,416 +0,0 @@
|
|||||||
name: render-manifests-push
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'clusters/cl01tl/helm/**'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CLUSTER: cl01tl
|
|
||||||
BASE_BRANCH: manifests
|
|
||||||
BRANCH_NAME: auto/update-manifests
|
|
||||||
ASSIGNEE: alexlebens
|
|
||||||
MAIN_DIR: /workspace/alexlebens/infrastructure/infrastructure
|
|
||||||
MANIFEST_DIR: /workspace/alexlebens/infrastructure/infrastructure-manifests
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
render-manifests-push:
|
|
||||||
runs-on: ubuntu-js
|
|
||||||
if: gitea.event.commits[0].author.username != 'renovate-bot'
|
|
||||||
steps:
|
|
||||||
- name: Checkout Main
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
path: infrastructure
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Checkout Manifests
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: manifests
|
|
||||||
path: infrastructure-manifests
|
|
||||||
|
|
||||||
- name: Set up Helm
|
|
||||||
uses: azure/setup-helm@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
version: v3.17.2 # Pending https://github.com/helm/helm/pull/30743
|
|
||||||
|
|
||||||
- name: Prepare Manifest Branch
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Configure git to use gitea-bot as user ..."
|
|
||||||
git config user.name "gitea-bot"
|
|
||||||
git config user.email "gitea-bot@alexlebens.net"
|
|
||||||
|
|
||||||
echo ">> Checking if PR branch exists ..."
|
|
||||||
if [[ $(git ls-remote --heads origin "${BRANCH_NAME}" | wc -l) -gt 0 ]]; then
|
|
||||||
echo ">> Branch '${BRANCH_NAME}' exists, pulling changes ..."
|
|
||||||
git fetch origin "${BRANCH_NAME}"
|
|
||||||
git checkout "${BRANCH_NAME}"
|
|
||||||
git pull --rebase
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> Branch '${BRANCH_NAME}' does not exist, creating ..."
|
|
||||||
git checkout -b $BRANCH_NAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Check which Directories have Changes
|
|
||||||
id: check-dir-changes
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
RENDER_DIR=()
|
|
||||||
|
|
||||||
echo ">> Checking for changes ..."
|
|
||||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
|
||||||
|
|
||||||
if [ -n "${GIT_DIFF}" ]; then
|
|
||||||
echo ">> Changes detected:"
|
|
||||||
echo "$GIT_DIFF"
|
|
||||||
for path in $GIT_DIFF; do
|
|
||||||
RENDER_DIR+=$(echo "$path" | awk -F '/' '{print $4}')
|
|
||||||
RENDER_DIR+=$(echo " ")
|
|
||||||
done
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> No changes detected"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${RENDER_DIR}" ]; then
|
|
||||||
echo ">> Directories to Render:"
|
|
||||||
echo "$(echo "${RENDER_DIR}" | sort -u)"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
echo "render-dir<<EOF" >> $GITEA_OUTPUT
|
|
||||||
echo "$(echo "${RENDER_DIR}" | 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:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
echo ">> Adding repositories for chart dependencies ..."
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
helm dependency list --max-col-width 120 ${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir 2> /dev/null \
|
|
||||||
| tail +2 | head -n -1 \
|
|
||||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
|
||||||
| while read cmd; do
|
|
||||||
if [[ "$cmd" == "*oci://*" ]]; then
|
|
||||||
echo ">> Ignoring OCI repo"
|
|
||||||
else
|
|
||||||
echo "$cmd" | sh;
|
|
||||||
fi
|
|
||||||
done || true
|
|
||||||
done
|
|
||||||
|
|
||||||
if helm repo list | tail +2 | read -r; then
|
|
||||||
echo ">> Update repository cache ..."
|
|
||||||
helm repo update
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Remove Changed Manifest Files
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
env:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Remove manfiest files and rebuild from source ..."
|
|
||||||
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
chart_path=${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$dir
|
|
||||||
|
|
||||||
echo "$chart_path"
|
|
||||||
rm -rf $chart_path/*
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Render Helm Manifests
|
|
||||||
id: render-manifests
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
env:
|
|
||||||
RENDER_DIR: ${{ steps.check-dir-changes.outputs.render-dir }}
|
|
||||||
run: |
|
|
||||||
cd ${MAIN_DIR}
|
|
||||||
|
|
||||||
echo ">> Rendering Manifests ..."
|
|
||||||
|
|
||||||
for dir in ${RENDER_DIR}; do
|
|
||||||
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
|
||||||
chart_name=$(basename "$chart_path")
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo ">> Rendering chart: $chart_name"
|
|
||||||
echo ">> Chart path $chart_path"
|
|
||||||
|
|
||||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
|
||||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
|
||||||
TEMPLATE=""
|
|
||||||
|
|
||||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
|
||||||
|
|
||||||
cd $chart_path
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Updating helm dependency ..."
|
|
||||||
helm dependency update --skip-refresh
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Building helm dependency ..."
|
|
||||||
helm dependency build --skip-refresh
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Linting helm ..."
|
|
||||||
helm lint --namespace "$chart_name"
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Rendering templates ..."
|
|
||||||
case "$chart_name" in
|
|
||||||
"stack")
|
|
||||||
echo ""
|
|
||||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
|
||||||
echo ""
|
|
||||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo ""
|
|
||||||
echo ">> Standard Rendering for $chart_name ..."
|
|
||||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Formating rendered template ..."
|
|
||||||
echo "$TEMPLATE" | yq '... comments=""' | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
|
||||||
|
|
||||||
# Strip comments again to ensure formatting correctness
|
|
||||||
for file in "$OUTPUT_FOLDER"/*; do
|
|
||||||
yq -i '... comments=""' $file
|
|
||||||
done
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
|
||||||
ls $OUTPUT_FOLDER
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
echo ">> Directory $chart_path does not contain a Chart.yaml. Skipping ..."
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Check for Changes
|
|
||||||
id: check-changes
|
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
GIT_CHANGES=$(git status --porcelain)
|
|
||||||
|
|
||||||
if [ -n "$GIT_CHANGES" ]; then
|
|
||||||
echo ">> Changes detected"
|
|
||||||
git status --porcelain
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> No changes detected, skipping PR creation"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Commit and Push Changes
|
|
||||||
id: commit-push
|
|
||||||
if: steps.check-changes.outputs.changes-detected == 'true'
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
echo ">> Commiting changes to ${BRANCH_NAME} ..."
|
|
||||||
git add .
|
|
||||||
git commit -m "chore: Update manifests after change"
|
|
||||||
|
|
||||||
REPO_URL="${{ secrets.REPO_URL }}/${{ gitea.repository }}"
|
|
||||||
echo ">> Pushing changes to $REPO_URL ..."
|
|
||||||
git push -u "https://oauth2:${{ secrets.BOT_TOKEN }}@$(echo $REPO_URL | sed -e 's|https://||')" ${BRANCH_NAME}
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "HEAD_BRANCH=${BRANCH_NAME}" >> $GITEA_OUTPUT
|
|
||||||
echo "push=true" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
- name: Check for Pull Request
|
|
||||||
id: check-for-pull-requst
|
|
||||||
if: steps.commit-push.outputs.push == 'true'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
||||||
GITEA_URL: ${{ secrets.REPO_URL }}
|
|
||||||
HEAD_BRANCH: ${{ steps.commit-push.outputs.HEAD_BRANCH }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
API_ENDPOINT="${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/pulls?base_branch=${BASE_BRANCH}&state=open&page=1"
|
|
||||||
|
|
||||||
echo ">> Checking if PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
|
||||||
echo ">> With Endpoint of:"
|
|
||||||
echo "$API_ENDPOINT"
|
|
||||||
|
|
||||||
HTTP_STATUS=$(
|
|
||||||
curl -X GET \
|
|
||||||
--silent \
|
|
||||||
--write-out '%{http_code}' \
|
|
||||||
--output response_body.json \
|
|
||||||
--dump-header response_headers.txt \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"$API_ENDPOINT" 2> response_errors.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
echo ">> HTTP Status Code: $HTTP_STATUS"
|
|
||||||
echo ">> Response Output ..."
|
|
||||||
echo "----"
|
|
||||||
cat response_body.json
|
|
||||||
echo "----"
|
|
||||||
cat response_headers.txt
|
|
||||||
echo "----"
|
|
||||||
cat response_errors.txt
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
if [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .[0].state)" == "open" ]; then
|
|
||||||
echo ">> Pull Request has been found open, will update"
|
|
||||||
PR_INDEX=$(cat response_body.json | jq -r .[0].number)
|
|
||||||
echo "pull-request-exists=${PR_INDEX}" >> $GITEA_OUTPUT
|
|
||||||
echo "pull-request-index=true" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .[0].state)" == "closed" ]; then
|
|
||||||
echo ">> Pull Request found, but was closed"
|
|
||||||
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> Pull Request not found"
|
|
||||||
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
id: create-pull-request
|
|
||||||
if: steps.commit-push.outputs.push == 'true' && steps.check-for-pull-requst.outputs.pull-request-exists == 'false'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
||||||
GITEA_URL: ${{ secrets.REPO_URL }}
|
|
||||||
HEAD_BRANCH: ${{ steps.commit-push.outputs.HEAD_BRANCH }}
|
|
||||||
run: |
|
|
||||||
cd ${MANIFEST_DIR}
|
|
||||||
|
|
||||||
API_ENDPOINT="${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/pulls"
|
|
||||||
|
|
||||||
PAYLOAD=$( jq -n \
|
|
||||||
--arg head "${HEAD_BRANCH}" \
|
|
||||||
--arg base "${BASE_BRANCH}" \
|
|
||||||
--arg assignee "${ASSIGNEE}" \
|
|
||||||
--arg title "Automated Manifest Update" \
|
|
||||||
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow." \
|
|
||||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body}' )
|
|
||||||
|
|
||||||
echo ">> Creating PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
|
||||||
echo ">> With Endpoint of:"
|
|
||||||
echo "$API_ENDPOINT"
|
|
||||||
echo ">> With Payload of:"
|
|
||||||
echo "$PAYLOAD"
|
|
||||||
|
|
||||||
HTTP_STATUS=$(
|
|
||||||
curl -X POST \
|
|
||||||
--silent \
|
|
||||||
--write-out '%{http_code}' \
|
|
||||||
--output response_body.json \
|
|
||||||
--dump-header response_headers.txt \
|
|
||||||
--data "$PAYLOAD" \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"$API_ENDPOINT" 2> response_errors.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
echo ">> HTTP Status Code: $HTTP_STATUS"
|
|
||||||
echo ">> Response Output ..."
|
|
||||||
echo "----"
|
|
||||||
cat response_body.json
|
|
||||||
echo "----"
|
|
||||||
cat response_headers.txt
|
|
||||||
echo "----"
|
|
||||||
cat response_errors.txt
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
if [ "$HTTP_STATUS" == "201" ]; then
|
|
||||||
echo ">> Pull Request created successfully!"
|
|
||||||
PR_URL=$(cat response_body.json | jq -r .html_url)
|
|
||||||
echo "pull-request-url=${PR_URL}" >> $GITEA_OUTPUT
|
|
||||||
PR_ID=$(cat response_body.json | jq -r .id)
|
|
||||||
echo "pull-request-id=${PR_ID}" >> $GITEA_OUTPUT
|
|
||||||
echo "pull-request-operation=created" >> $GITEA_OUTPUT
|
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "422" ]; then
|
|
||||||
echo ">> Failed to create PR (HTTP 422: Unprocessable Entity), PR may already exist"
|
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "409" ]; then
|
|
||||||
echo ">> Failed to create PR (HTTP 409: Conflict), PR already exists"
|
|
||||||
|
|
||||||
else
|
|
||||||
echo ">> Failed to create PR, HTTP status code: $HTTP_STATUS"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: ntfy Created
|
|
||||||
uses: niniyas/ntfy-action@master
|
|
||||||
if: steps.create-pull-request.outputs.pull-request-operation == 'created'
|
|
||||||
with:
|
|
||||||
url: "${{ secrets.NTFY_URL }}"
|
|
||||||
topic: "${{ secrets.NTFY_TOPIC }}"
|
|
||||||
title: "Manifest Render PR Created - Infrastructure"
|
|
||||||
priority: 3
|
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
||||||
tags: action,successfully,completed
|
|
||||||
details: "Manifest rendering for Infrastructure has created a new Pull Request with ID: ${{ steps.create-pull-request.outputs.pull-request-id }}!"
|
|
||||||
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "${{ steps.create-pull-request.outputs.pull-request-url }}", "clear": true}]'
|
|
||||||
|
|
||||||
- name: ntfy Failed
|
|
||||||
uses: niniyas/ntfy-action@master
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
url: "${{ secrets.NTFY_URL }}"
|
|
||||||
topic: "${{ secrets.NTFY_TOPIC }}"
|
|
||||||
title: "Manifest Render Failure - Infrastructure"
|
|
||||||
priority: 4
|
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
||||||
tags: action,failed
|
|
||||||
details: "Manifest rendering for Infrastructure has failed!"
|
|
||||||
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=render-manifests.yaml", "clear": true}]'
|
|
||||||
image: true
|
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
name: render-manifests-dispatch
|
name: render-manifests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'clusters/cl01tl/helm/**'
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -12,7 +18,7 @@ env:
|
|||||||
MANIFEST_DIR: /workspace/alexlebens/infrastructure/infrastructure-manifests
|
MANIFEST_DIR: /workspace/alexlebens/infrastructure/infrastructure-manifests
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
render-manifests-dispatch:
|
render-manifests:
|
||||||
runs-on: ubuntu-js
|
runs-on: ubuntu-js
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Main
|
- name: Checkout Main
|
||||||
@@ -53,7 +59,7 @@ jobs:
|
|||||||
git checkout -b $BRANCH_NAME
|
git checkout -b $BRANCH_NAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "----"
|
echo "-----"
|
||||||
|
|
||||||
- name: Check which Directories have Changes
|
- name: Check which Directories have Changes
|
||||||
id: check-dir-changes
|
id: check-dir-changes
|
||||||
@@ -62,23 +68,35 @@ jobs:
|
|||||||
|
|
||||||
RENDER_DIR=()
|
RENDER_DIR=()
|
||||||
|
|
||||||
echo ">> Triggered on dispatch, will check all paths ..."
|
if [ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]; then
|
||||||
RENDER_DIR+=$(ls clusters/cl01tl/helm/)
|
echo ">> Triggered on dispatch, will check all paths .."
|
||||||
|
RENDER_DIR+=$(ls clusters/cl01tl/helm/)
|
||||||
|
|
||||||
if [ -n "${RENDER_DIR}" ]; then
|
|
||||||
echo ">> Directories to Render:"
|
|
||||||
echo "$(echo "${RENDER_DIR}" | sort -u)"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
|
||||||
echo "render-dir<<EOF" >> $GITEA_OUTPUT
|
|
||||||
echo "$(echo "${RENDER_DIR}" | sort -u)" >> $GITEA_OUTPUT
|
|
||||||
echo "EOF" >> $GITEA_OUTPUT
|
|
||||||
else
|
else
|
||||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
echo ">> Checking for changes ..."
|
||||||
|
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep "clusters/cl01tl/helm/")
|
||||||
|
|
||||||
|
if [ -n $GIT_DIFF ]; then
|
||||||
|
echo ">> Changes detected:"
|
||||||
|
echo "$GIT_DIFF"
|
||||||
|
for path in $GIT_DIFF; do
|
||||||
|
RENDER_DIR+=$(echo "$path" | awk -F '/' '{print $4}')
|
||||||
|
done
|
||||||
|
|
||||||
|
else
|
||||||
|
echo ">> No changes detected"
|
||||||
|
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo ">> Directories to Render:"
|
||||||
|
RENDER_DIR=$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)
|
||||||
|
echo "$RENDER_DIR"
|
||||||
|
echo "-----"
|
||||||
|
|
||||||
|
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||||
|
echo "render-dir=${RENDER_DIR}" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
- name: Add Repositories
|
- name: Add Repositories
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||||
env:
|
env:
|
||||||
@@ -91,21 +109,10 @@ jobs:
|
|||||||
helm dependency list --max-col-width 120 ${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir 2> /dev/null \
|
helm dependency list --max-col-width 120 ${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir 2> /dev/null \
|
||||||
| tail +2 | head -n -1 \
|
| tail +2 | head -n -1 \
|
||||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||||
| while read cmd; do
|
| while read cmd; do echo "$cmd" | sh; done || true
|
||||||
if [[ "$cmd" == "*oci://*" ]]; then
|
|
||||||
echo ">> Ignoring OCI repo"
|
|
||||||
else
|
|
||||||
echo "$cmd" | sh;
|
|
||||||
fi
|
|
||||||
done || true
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if helm repo list | tail +2 | read -r; then
|
echo "-----"
|
||||||
echo ">> Update repository cache ..."
|
|
||||||
helm repo update
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
|
|
||||||
- name: Remove Changed Manifest Files
|
- name: Remove Changed Manifest Files
|
||||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||||
@@ -119,11 +126,11 @@ jobs:
|
|||||||
for dir in ${RENDER_DIR}; do
|
for dir in ${RENDER_DIR}; do
|
||||||
chart_path=${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$dir
|
chart_path=${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$dir
|
||||||
|
|
||||||
echo "$chart_path"
|
echo ">> Removing from $chart_path ..."
|
||||||
rm -rf $chart_path/*
|
rm -rf $chart_path/*
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "----"
|
echo "-----"
|
||||||
|
|
||||||
- name: Render Helm Manifests
|
- name: Render Helm Manifests
|
||||||
id: render-manifests
|
id: render-manifests
|
||||||
@@ -139,26 +146,18 @@ jobs:
|
|||||||
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
||||||
chart_name=$(basename "$chart_path")
|
chart_name=$(basename "$chart_path")
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo ">> Rendering chart: $chart_name"
|
echo ">> Rendering chart: $chart_name"
|
||||||
echo ">> Chart path $chart_path"
|
echo ">> Chart path $chart_path"
|
||||||
|
|
||||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
|
||||||
TEMPLATE=""
|
|
||||||
|
|
||||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||||
|
OUTPUT_FILE="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/$chart_name.yaml"
|
||||||
|
|
||||||
cd $chart_path
|
cd $chart_path
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Updating helm dependency ..."
|
|
||||||
helm dependency update --skip-refresh
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Building helm dependency ..."
|
echo ">> Building helm dependency ..."
|
||||||
helm dependency build --skip-refresh
|
helm dependency build
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Linting helm ..."
|
echo ">> Linting helm ..."
|
||||||
@@ -166,36 +165,10 @@ jobs:
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Rendering templates ..."
|
echo ">> Rendering templates ..."
|
||||||
case "$chart_name" in
|
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds > "$OUTPUT_FILE"
|
||||||
"stack")
|
|
||||||
echo ""
|
|
||||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
|
||||||
echo ""
|
|
||||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo ""
|
|
||||||
echo ">> Standard Rendering for $chart_name ..."
|
|
||||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Formating rendered template ..."
|
echo ">> Manifests for $chart_name rendered to $OUTPUT_FILE"
|
||||||
echo "$TEMPLATE" | yq '... comments=""' | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
|
||||||
|
|
||||||
# Strip comments again to ensure formatting correctness
|
|
||||||
for file in "$OUTPUT_FOLDER"/*; do
|
|
||||||
yq -i '... comments=""' $file
|
|
||||||
done
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
|
||||||
ls $OUTPUT_FOLDER
|
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
@@ -204,7 +177,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "----"
|
echo "-----"
|
||||||
|
|
||||||
- name: Check for Changes
|
- name: Check for Changes
|
||||||
id: check-changes
|
id: check-changes
|
||||||
@@ -212,19 +185,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd ${MANIFEST_DIR}
|
cd ${MANIFEST_DIR}
|
||||||
|
|
||||||
GIT_CHANGES=$(git status --porcelain)
|
if git status --porcelain | grep -q .; then
|
||||||
|
|
||||||
if [ -n "$GIT_CHANGES" ]; then
|
|
||||||
echo ">> Changes detected"
|
echo ">> Changes detected"
|
||||||
git status --porcelain
|
git status --porcelain
|
||||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
else
|
else
|
||||||
echo ">> No changes detected, skipping PR creation"
|
echo ">> No changes detected, skipping PR creation"
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "----"
|
echo "-----"
|
||||||
|
|
||||||
- name: Commit and Push Changes
|
- name: Commit and Push Changes
|
||||||
id: commit-push
|
id: commit-push
|
||||||
@@ -236,11 +206,11 @@ jobs:
|
|||||||
git add .
|
git add .
|
||||||
git commit -m "chore: Update manifests after change"
|
git commit -m "chore: Update manifests after change"
|
||||||
|
|
||||||
REPO_URL="${{ secrets.REPO_URL }}/${{ gitea.repository }}"
|
|
||||||
echo ">> Pushing changes to $REPO_URL ..."
|
echo ">> Pushing changes to $REPO_URL ..."
|
||||||
|
REPO_URL="${{ secrets.REPO_URL }}/${{ gitea.repository }}"
|
||||||
git push -u "https://oauth2:${{ secrets.BOT_TOKEN }}@$(echo $REPO_URL | sed -e 's|https://||')" ${BRANCH_NAME}
|
git push -u "https://oauth2:${{ secrets.BOT_TOKEN }}@$(echo $REPO_URL | sed -e 's|https://||')" ${BRANCH_NAME}
|
||||||
|
|
||||||
echo "----"
|
echo "-----"
|
||||||
|
|
||||||
echo "HEAD_BRANCH=${BRANCH_NAME}" >> $GITEA_OUTPUT
|
echo "HEAD_BRANCH=${BRANCH_NAME}" >> $GITEA_OUTPUT
|
||||||
echo "push=true" >> $GITEA_OUTPUT
|
echo "push=true" >> $GITEA_OUTPUT
|
||||||
@@ -282,13 +252,13 @@ jobs:
|
|||||||
cat response_errors.txt
|
cat response_errors.txt
|
||||||
echo "----"
|
echo "----"
|
||||||
|
|
||||||
if [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .[0].state)" == "open" ]; then
|
if [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .state)" == "open" ]; then
|
||||||
echo ">> Pull Request has been found open, will update"
|
echo ">> Pull Request has been found open, will update"
|
||||||
PR_INDEX=$(cat response_body.json | jq -r .[0].number)
|
PR_INDEX=$(cat response_body.json | jq -r .number)
|
||||||
echo "pull-request-exists=${PR_INDEX}" >> $GITEA_OUTPUT
|
echo "pull-request-exists=${PR_INDEX}" >> $GITEA_OUTPUT
|
||||||
echo "pull-request-index=true" >> $GITEA_OUTPUT
|
echo "pull-request-index=true" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .[0].state)" == "closed" ]; then
|
elif [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .state)" == "closed" ]; then
|
||||||
echo ">> Pull Request found, but was closed"
|
echo ">> Pull Request found, but was closed"
|
||||||
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
@@ -297,7 +267,7 @@ jobs:
|
|||||||
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "----"
|
echo "-----"
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
id: create-pull-request
|
id: create-pull-request
|
||||||
@@ -317,7 +287,7 @@ jobs:
|
|||||||
--arg assignee "${ASSIGNEE}" \
|
--arg assignee "${ASSIGNEE}" \
|
||||||
--arg title "Automated Manifest Update" \
|
--arg title "Automated Manifest Update" \
|
||||||
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow." \
|
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow." \
|
||||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body}' )
|
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body'} )
|
||||||
|
|
||||||
echo ">> Creating PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
echo ">> Creating PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
||||||
echo ">> With Endpoint of:"
|
echo ">> With Endpoint of:"
|
||||||
@@ -351,8 +321,6 @@ jobs:
|
|||||||
echo ">> Pull Request created successfully!"
|
echo ">> Pull Request created successfully!"
|
||||||
PR_URL=$(cat response_body.json | jq -r .html_url)
|
PR_URL=$(cat response_body.json | jq -r .html_url)
|
||||||
echo "pull-request-url=${PR_URL}" >> $GITEA_OUTPUT
|
echo "pull-request-url=${PR_URL}" >> $GITEA_OUTPUT
|
||||||
PR_ID=$(cat response_body.json | jq -r .id)
|
|
||||||
echo "pull-request-id=${PR_ID}" >> $GITEA_OUTPUT
|
|
||||||
echo "pull-request-operation=created" >> $GITEA_OUTPUT
|
echo "pull-request-operation=created" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "422" ]; then
|
elif [ "$HTTP_STATUS" == "422" ]; then
|
||||||
@@ -366,7 +334,17 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "----"
|
echo "-----"
|
||||||
|
|
||||||
|
- name: Cleanup Branch
|
||||||
|
if: failure() && steps.create-pull-request.outcome == 'failure'
|
||||||
|
env:
|
||||||
|
HEAD_BRANCH: ${{ steps.commit-push.outputs.HEAD_BRANCH }}
|
||||||
|
run: |
|
||||||
|
echo ">> Removing branch: ${HEAD_BRANCH}"
|
||||||
|
git push origin --delete ${HEAD_BRANCH}
|
||||||
|
|
||||||
|
echo "-----"
|
||||||
|
|
||||||
- name: ntfy Created
|
- name: ntfy Created
|
||||||
uses: niniyas/ntfy-action@master
|
uses: niniyas/ntfy-action@master
|
||||||
@@ -378,7 +356,7 @@ jobs:
|
|||||||
priority: 3
|
priority: 3
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
tags: action,successfully,completed
|
tags: action,successfully,completed
|
||||||
details: "Manifest rendering for Infrastructure has created a new Pull Request with ID: ${{ steps.create-pull-request.outputs.pull-request-id }}!"
|
details: "Manifest rendering for Infrastructure has created a new Pull Request!"
|
||||||
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
||||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "${{ steps.create-pull-request.outputs.pull-request-url }}", "clear": true}]'
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "${{ steps.create-pull-request.outputs.pull-request-url }}", "clear": true}]'
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ maintainers:
|
|||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: argo-cd
|
- name: argo-cd
|
||||||
version: 9.1.8
|
version: 9.1.5
|
||||||
repository: https://argoproj.github.io/argo-helm
|
repository: https://argoproj.github.io/argo-helm
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/argo-cd.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/argo-cd.png
|
||||||
appVersion: v3.2.1
|
appVersion: 3.0.0
|
||||||
@@ -25,7 +25,6 @@ argo-cd:
|
|||||||
id: authentik
|
id: authentik
|
||||||
params:
|
params:
|
||||||
server.insecure: true
|
server.insecure: true
|
||||||
controller.diff.server.side: true
|
|
||||||
rbac:
|
rbac:
|
||||||
policy.csv: |
|
policy.csv: |
|
||||||
g, ArgoCD Admins, role:admin
|
g, ArgoCD Admins, role:admin
|
||||||
@@ -61,7 +60,7 @@ argo-cd:
|
|||||||
enabled: true
|
enabled: true
|
||||||
auth: false
|
auth: false
|
||||||
redisSecretInit:
|
redisSecretInit:
|
||||||
enabled: false
|
enabled: true
|
||||||
server:
|
server:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
extensions:
|
extensions:
|
||||||
@@ -280,7 +279,7 @@ argo-cd:
|
|||||||
- description: Application has degraded
|
- description: Application has degraded
|
||||||
send:
|
send:
|
||||||
- app-health-degraded
|
- app-health-degraded
|
||||||
when: app.status.health.status == 'Degraded'
|
when: app.status.health.status == 'Degraded' and time.Now().Sub(time.Parse(app.status.health.lastTransitionTime).Minutes() >= 15
|
||||||
trigger.on-sync-failed: |
|
trigger.on-sync-failed: |
|
||||||
- description: Application syncing has failed
|
- description: Application syncing has failed
|
||||||
send:
|
send:
|
||||||
16
clusters/cl01tl/deployment/stack/Chart.yaml
Normal file
16
clusters/cl01tl/deployment/stack/Chart.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: stack
|
||||||
|
version: 1.0.0
|
||||||
|
description: Stack
|
||||||
|
keywords:
|
||||||
|
- argo-cd
|
||||||
|
- stack
|
||||||
|
- deployment
|
||||||
|
home: https://wiki.alexlebens.dev/s/0c2d1896-710d-4972-9bc8-08d71987428a
|
||||||
|
sources:
|
||||||
|
- https://github.com/argoproj/argo-cd
|
||||||
|
- https://gitea.alexlebens.dev/alexlebens/infrastructure
|
||||||
|
maintainers:
|
||||||
|
- name: alexlebens
|
||||||
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/argo-cd.png
|
||||||
|
appVersion: 1.0.0
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
{{- range $index, $stack := .Values.applicationSet }}
|
||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: ApplicationSet
|
||||||
|
metadata:
|
||||||
|
name: {{ $stack.name }}
|
||||||
|
namespace: {{ $.Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ $stack.name }}
|
||||||
|
app.kubernetes.io/instance: {{ $stack.name }}
|
||||||
|
app.kubernetes.io/part-of: {{ $.Release.Name }}
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
syncPolicy:
|
||||||
|
applicationsSync: create-update
|
||||||
|
preserveResourcesOnDeletion: true
|
||||||
|
generators:
|
||||||
|
- git:
|
||||||
|
repoURL: {{ $.Values.git.repo }}
|
||||||
|
revision: {{ $.Values.git.revision }}
|
||||||
|
directories:
|
||||||
|
- path: "clusters/{{ $.Values.cluster.name }}/{{ $stack.name }}/*"
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: '{{ `{{path.basename}}` }}'
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: '{{ $stack.namespace | default `{{path.basename}}` }}'
|
||||||
|
project: default
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
source:
|
||||||
|
repoURL: {{ $.Values.git.repo }}
|
||||||
|
targetRevision: {{ $.Values.git.revision }}
|
||||||
|
path: '{{ `{{path}}` }}'
|
||||||
|
helm:
|
||||||
|
releaseName: "{{ `{{path.basename}}` }}"
|
||||||
|
{{- if $stack.ignoreDifferences }}
|
||||||
|
ignoreDifferences:
|
||||||
|
{{- toYaml $stack.ignoreDifferences | nindent 8 }}
|
||||||
|
{{ end }}
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: {{ $stack.syncPolicy.automated.prune | default false }}
|
||||||
|
selfHeal: {{ $stack.syncPolicy.automated.selfHeal | default false }}
|
||||||
|
retry:
|
||||||
|
limit: 3
|
||||||
|
backoff:
|
||||||
|
duration: 1m
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 15m
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace={{ $stack.syncPolicy.syncOptions.createNamespace | default true }}
|
||||||
|
- ApplyOutOfSyncOnly={{ $stack.syncPolicy.syncOptions.applyOutOfSyncOnly | default true }}
|
||||||
|
- ServerSideApply={{ $stack.syncPolicy.syncOptions.serverSideApply | default true }}
|
||||||
|
- PruneLast={{ $stack.syncPolicy.syncOptions.pruneLast | default true }}
|
||||||
|
- RespectIgnoreDifferences={{ $stack.syncPolicy.syncOptions.respectIgnoreDifferences | default true }}
|
||||||
|
{{- end }}
|
||||||
192
clusters/cl01tl/deployment/stack/templates/application.yaml
Normal file
192
clusters/cl01tl/deployment/stack/templates/application.yaml
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: cilium
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: cilium
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: {{ .Values.git.repo }}
|
||||||
|
targetRevision: {{ .Values.git.revision }}
|
||||||
|
path: clusters/{{ .Values.cluster.name }}/standalone/cilium
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: kube-system
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: monitoring.coreos.com
|
||||||
|
kind: ServiceMonitor
|
||||||
|
jqPathExpressions:
|
||||||
|
- .spec.endpoints[]?.relabelings[]?.action
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
retry:
|
||||||
|
limit: 10
|
||||||
|
backoff:
|
||||||
|
duration: 1m
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 16m
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=false
|
||||||
|
- ApplyOutOfSyncOnly=true
|
||||||
|
- ServerSideApply=true
|
||||||
|
- PruneLast=true
|
||||||
|
- RespectIgnoreDifferences=true
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: coredns
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: coredns
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: {{ .Values.git.repo }}
|
||||||
|
targetRevision: {{ .Values.git.revision }}
|
||||||
|
path: clusters/{{ .Values.cluster.name }}/standalone/coredns
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: kube-system
|
||||||
|
revisionHistoryLimit: 10
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
retry:
|
||||||
|
limit: 10
|
||||||
|
backoff:
|
||||||
|
duration: 1m
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 16m
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=false
|
||||||
|
- ApplyOutOfSyncOnly=true
|
||||||
|
- ServerSideApply=true
|
||||||
|
- PruneLast=true
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: metrics-server
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: metrics-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: {{ .Values.git.repo }}
|
||||||
|
targetRevision: {{ .Values.git.revision }}
|
||||||
|
path: clusters/{{ .Values.cluster.name }}/standalone/metrics-server
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: kube-system
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
retry:
|
||||||
|
limit: 10
|
||||||
|
backoff:
|
||||||
|
duration: 1m
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 16m
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=false
|
||||||
|
- ApplyOutOfSyncOnly=true
|
||||||
|
- ServerSideApply=true
|
||||||
|
- PruneLast=true
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: kubelet-serving-cert-approver
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: kubelet-serving-cert-approver
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: {{ .Values.git.repo }}
|
||||||
|
targetRevision: {{ .Values.git.revision }}
|
||||||
|
path: clusters/{{ .Values.cluster.name }}/standalone/kubelet-serving-cert-approver
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: kubelet-serving-cert-approver
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
retry:
|
||||||
|
limit: 10
|
||||||
|
backoff:
|
||||||
|
duration: 1m
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 16m
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
- ApplyOutOfSyncOnly=true
|
||||||
|
- ServerSideApply=true
|
||||||
|
- PruneLast=true
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: prometheus-operator-crds
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: prometheus-operator-crds
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: {{ .Values.git.repo }}
|
||||||
|
targetRevision: {{ .Values.git.revision }}
|
||||||
|
path: clusters/{{ .Values.cluster.name }}/standalone/prometheus-operator-crds
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: kube-system
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: false
|
||||||
|
retry:
|
||||||
|
limit: 10
|
||||||
|
backoff:
|
||||||
|
duration: 1m
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 16m
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=false
|
||||||
|
- ApplyOutOfSyncOnly=true
|
||||||
|
- ServerSideApply=true
|
||||||
|
- PruneLast=true
|
||||||
16
clusters/cl01tl/deployment/stack/values.yaml
Normal file
16
clusters/cl01tl/deployment/stack/values.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
cluster:
|
||||||
|
name: cl01tl
|
||||||
|
git:
|
||||||
|
# repo: git@github.com:alexlebens/infrastructure.git
|
||||||
|
# repo: https://github.com/alexlebens/infrastructure.git
|
||||||
|
repo: http://gitea-http.gitea:3000/alexlebens/infrastructure
|
||||||
|
# repo: ssh://git@gitea-ssh.gitea/alexlebens/infrastructure
|
||||||
|
revision: HEAD
|
||||||
|
applicationSet:
|
||||||
|
- name: deployment
|
||||||
|
namespace: argocd
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
syncOptions:
|
||||||
|
serverSideApply: true
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
digest: sha256:b5d823171e1b4dc1d3856f782f0c67cbb5d49e4fa170df2f21b06303c7aff7f5
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-11-30T21:05:19.732832-06:00"
|
||||||
version: 0.3.0
|
|
||||||
digest: sha256:3763d6c5c0b45219235229aa1d72bfa426abd29aa8d92c1b1ca958b6afb3bfc8
|
|
||||||
generated: "2025-12-15T17:43:51.908308-06:00"
|
|
||||||
|
|||||||
@@ -16,10 +16,6 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: actual
|
alias: actual
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-data
|
|
||||||
version: 0.3.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/actual-budget.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/actual-budget.png
|
||||||
appVersion: 25.12.0
|
appVersion: 25.11.0
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: seerr-config-backup-secret
|
name: actual-data-backup-secret
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: seerr-config-backup-secret
|
app.kubernetes.io/name: actual-data-backup-secret
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
@@ -16,7 +16,7 @@ spec:
|
|||||||
mergePolicy: Merge
|
mergePolicy: Merge
|
||||||
engineVersion: v2
|
engineVersion: v2
|
||||||
data:
|
data:
|
||||||
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/seerr/seerr-config"
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/actual/actual-data"
|
||||||
data:
|
data:
|
||||||
- secretKey: BUCKET_ENDPOINT
|
- secretKey: BUCKET_ENDPOINT
|
||||||
remoteRef:
|
remoteRef:
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: actual-data-backup-source
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: actual-data-backup-source
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: actual-data
|
||||||
|
trigger:
|
||||||
|
schedule: 0 4 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: actual-data-backup-secret
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
@@ -9,7 +9,7 @@ actual:
|
|||||||
main:
|
main:
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/actualbudget/actual
|
repository: ghcr.io/actualbudget/actual
|
||||||
tag: 25.12.0
|
tag: 25.11.0
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
@@ -54,5 +54,3 @@ actual:
|
|||||||
main:
|
main:
|
||||||
- path: /data
|
- path: /data
|
||||||
readOnly: false
|
readOnly: false
|
||||||
volsync-target-data:
|
|
||||||
pvcTarget: actual-data
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: argo-workflows
|
- name: argo-workflows
|
||||||
repository: https://argoproj.github.io/argo-helm
|
repository: https://argoproj.github.io/argo-helm
|
||||||
version: 0.46.2
|
version: 0.45.28
|
||||||
- name: argo-events
|
- name: argo-events
|
||||||
repository: https://argoproj.github.io/argo-helm
|
repository: https://argoproj.github.io/argo-helm
|
||||||
version: 2.4.19
|
version: 2.4.17
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 7.1.3
|
version: 6.16.0
|
||||||
digest: sha256:fb51f9312fd003df7f9beced8e3583eb66c74a57820effab510bd80ce3a91558
|
digest: sha256:b00fd479a9d9e606661b3799182c8e24395b4f531f8d2bda87bdc5db16a8d66c
|
||||||
generated: "2025-12-17T16:08:51.370582257Z"
|
generated: "2025-12-01T19:55:40.18149-06:00"
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ maintainers:
|
|||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: argo-workflows
|
- name: argo-workflows
|
||||||
version: 0.46.2
|
version: 0.45.28
|
||||||
repository: https://argoproj.github.io/argo-helm
|
repository: https://argoproj.github.io/argo-helm
|
||||||
- name: argo-events
|
- name: argo-events
|
||||||
version: 2.4.19
|
version: 2.4.17
|
||||||
repository: https://argoproj.github.io/argo-helm
|
repository: https://argoproj.github.io/argo-helm
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
alias: postgres-18-cluster
|
alias: postgres-17-cluster
|
||||||
version: 7.1.3
|
version: 6.16.0
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/argo-cd.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/argo-cd.png
|
||||||
appVersion: v3.7.6
|
appVersion: v3.6.7
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ spec:
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: argo-workflows-postgresql-18-cluster-backup-secret
|
name: argo-workflows-postgresql-17-cluster-backup-secret
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: argo-workflows-postgresql-18-cluster-backup-secret
|
app.kubernetes.io/name: argo-workflows-postgresql-17-cluster-backup-secret
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
@@ -61,10 +61,10 @@ spec:
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: argo-workflows-postgresql-18-cluster-backup-secret-garage
|
name: argo-workflows-postgresql-17-cluster-backup-secret-garage
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: argo-workflows-postgresql-18-cluster-backup-secret-garage
|
app.kubernetes.io/name: argo-workflows-postgresql-17-cluster-backup-secret-garage
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ argo-workflows:
|
|||||||
nodeStatusOffLoad: true
|
nodeStatusOffLoad: true
|
||||||
archive: true
|
archive: true
|
||||||
postgresql:
|
postgresql:
|
||||||
host: argo-workflows-postgresql-18-cluster-rw
|
host: argo-workflows-postgresql-17-cluster-rw
|
||||||
port: 5432
|
port: 5432
|
||||||
database: app
|
database: app
|
||||||
tableName: app
|
tableName: app
|
||||||
userNameSecret:
|
userNameSecret:
|
||||||
name: argo-workflows-postgresql-18-cluster-app
|
name: argo-workflows-postgresql-17-cluster-app
|
||||||
key: username
|
key: username
|
||||||
passwordSecret:
|
passwordSecret:
|
||||||
name: argo-workflows-postgresql-18-cluster-app
|
name: argo-workflows-postgresql-17-cluster-app
|
||||||
key: password
|
key: password
|
||||||
ssl: false
|
ssl: false
|
||||||
sslMode: disable
|
sslMode: disable
|
||||||
@@ -59,6 +59,20 @@ argo-workflows:
|
|||||||
useStaticCredentials: true
|
useStaticCredentials: true
|
||||||
artifactRepository:
|
artifactRepository:
|
||||||
archiveLogs: false
|
archiveLogs: false
|
||||||
|
s3: {}
|
||||||
|
# accessKeySecret:
|
||||||
|
# name: "{{ .Release.Name }}-minio"
|
||||||
|
# key: accesskey
|
||||||
|
# secretKeySecret:
|
||||||
|
# name: "{{ .Release.Name }}-minio"
|
||||||
|
# key: secretkey
|
||||||
|
# insecure: true
|
||||||
|
# bucket:
|
||||||
|
# endpoint:
|
||||||
|
# region:
|
||||||
|
# encryptionOptions:
|
||||||
|
# enableEncryption: true
|
||||||
|
|
||||||
argo-events:
|
argo-events:
|
||||||
controller:
|
controller:
|
||||||
resources:
|
resources:
|
||||||
@@ -75,57 +89,59 @@ argo-events:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 128Mi
|
memory: 128Mi
|
||||||
postgres-18-cluster:
|
postgres-17-cluster:
|
||||||
mode: recovery
|
mode: recovery
|
||||||
cluster:
|
cluster:
|
||||||
storage:
|
storage:
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
walStorage:
|
walStorage:
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
|
monitoring:
|
||||||
|
enabled: true
|
||||||
|
prometheusRule:
|
||||||
|
enabled: true
|
||||||
recovery:
|
recovery:
|
||||||
method: objectStore
|
method: objectStore
|
||||||
objectStore:
|
objectStore:
|
||||||
destinationPath: s3://postgres-backups/cl01tl/argo-workflows/argo-workflows-postgresql-18-cluster
|
destinationPath: s3://postgres-backups/cl01tl/argo-workflows/argo-workflows-postgresql-17-cluster
|
||||||
endpointURL: http://garage-main.garage:3900
|
endpointURL: http://garage-main.garage:3900
|
||||||
index: 1
|
index: 1
|
||||||
endpointCredentials: argo-workflows-postgresql-18-cluster-backup-secret-garage
|
endpointCredentials: argo-workflows-postgresql-17-cluster-backup-secret-garage
|
||||||
backup:
|
backup:
|
||||||
objectStore:
|
objectStore:
|
||||||
|
- name: external
|
||||||
|
destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/argo-workflows/argo-workflows-postgresql-17-cluster
|
||||||
|
index: 1
|
||||||
|
retentionPolicy: "30d"
|
||||||
|
isWALArchiver: false
|
||||||
- name: garage-local
|
- name: garage-local
|
||||||
destinationPath: s3://postgres-backups/cl01tl/argo-workflows/argo-workflows-postgresql-18-cluster
|
destinationPath: s3://postgres-backups/cl01tl/argo-workflows/argo-workflows-postgresql-17-cluster
|
||||||
index: 1
|
index: 1
|
||||||
endpointURL: http://garage-main.garage:3900
|
endpointURL: http://garage-main.garage:3900
|
||||||
endpointCredentials: argo-workflows-postgresql-18-cluster-backup-secret-garage
|
endpointCredentials: argo-workflows-postgresql-17-cluster-backup-secret-garage
|
||||||
endpointCredentialsIncludeRegion: true
|
endpointCredentialsIncludeRegion: true
|
||||||
retentionPolicy: "3d"
|
retentionPolicy: "3d"
|
||||||
isWALArchiver: true
|
isWALArchiver: true
|
||||||
# - name: external
|
|
||||||
# destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/argo-workflows/argo-workflows-postgresql-18-cluster
|
|
||||||
# index: 1
|
|
||||||
# retentionPolicy: "30d"
|
|
||||||
# isWALArchiver: false
|
|
||||||
# - name: garage-remote
|
# - name: garage-remote
|
||||||
# destinationPath: s3://postgres-backups/cl01tl/argo-workflows/argo-workflows-postgresql-18-cluster
|
# destinationPath: s3://postgres-backups/cl01tl/argo-workflows/argo-workflows-postgresql-17-cluster
|
||||||
# index: 1
|
# index: 1
|
||||||
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
||||||
# endpointCredentials: argo-workflows-postgresql-18-cluster-backup-secret-garage
|
# endpointCredentials: argo-workflows-postgresql-17-cluster-backup-secret-garage
|
||||||
# endpointCredentialsIncludeRegion: true
|
# endpointCredentialsIncludeRegion: true
|
||||||
# retentionPolicy: "30d"
|
# retentionPolicy: "30d"
|
||||||
# data:
|
# data:
|
||||||
# compression: bzip2
|
# compression: bzip2
|
||||||
scheduledBackups:
|
scheduledBackups:
|
||||||
|
- name: daily-backup
|
||||||
|
suspend: false
|
||||||
|
schedule: "0 0 0 * * *"
|
||||||
|
backupName: external
|
||||||
- name: live-backup
|
- name: live-backup
|
||||||
suspend: false
|
suspend: false
|
||||||
immediate: true
|
immediate: true
|
||||||
schedule: "0 0 0 * * *"
|
schedule: "0 0 0 * * *"
|
||||||
backupName: garage-local
|
backupName: garage-local
|
||||||
# - name: daily-backup
|
|
||||||
# suspend: false
|
|
||||||
# immediate: true
|
|
||||||
# schedule: "0 0 0 * * *"
|
|
||||||
# backupName: external
|
|
||||||
# - name: weekly-backup
|
# - name: weekly-backup
|
||||||
# suspend: true
|
# suspend: true
|
||||||
# immediate: true
|
|
||||||
# schedule: "0 0 4 * * SAT"
|
# schedule: "0 0 4 * * SAT"
|
||||||
# backupName: garage-remote
|
# backupName: garage-remote
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
dependencies:
|
|
||||||
- name: argo-cd
|
|
||||||
repository: https://argoproj.github.io/argo-helm
|
|
||||||
version: 9.1.8
|
|
||||||
digest: sha256:4d2089dba47c25af1126a5397f001bb114f6c464b20493c382c4c7b315e42c24
|
|
||||||
generated: "2025-12-17T01:21:10.460753309Z"
|
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
digest: sha256:f3a9990542f24965fadad0b5493059b78cdc3fae91c8214577fa6f41ca5f7de3
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-11-30T21:05:21.317114-06:00"
|
||||||
version: 0.3.0
|
|
||||||
- name: volsync-target
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
version: 0.3.0
|
|
||||||
digest: sha256:88e0d8008795451a64f3a2e4fa4fc120d48cef4badb4305e8e60afbb494352c5
|
|
||||||
generated: "2025-12-15T18:19:02.989735-06:00"
|
|
||||||
|
|||||||
@@ -18,14 +18,6 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: audiobookshelf
|
alias: audiobookshelf
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-config
|
|
||||||
version: 0.3.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-metadata
|
|
||||||
version: 0.3.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/audiobookshelf.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/audiobookshelf.png
|
||||||
appVersion: 2.31.0
|
appVersion: 2.21.0
|
||||||
|
|||||||
@@ -19,3 +19,117 @@ spec:
|
|||||||
key: /cl01tl/audiobookshelf/apprise
|
key: /cl01tl/audiobookshelf/apprise
|
||||||
metadataPolicy: None
|
metadataPolicy: None
|
||||||
property: ntfy-url
|
property: ntfy-url
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf-config-backup-secret
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: audiobookshelf-config-backup-secret
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/audiobookshelf/audiobookshelf-config"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: S3_BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_DEFAULT_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: access_key
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: secret_key
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf-metadata-backup-secret
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: audiobookshelf-metadata-backup-secret
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/audiobookshelf/audiobookshelf-metadata"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: S3_BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_DEFAULT_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: access_key
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: secret_key
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf-nfs-storage-backup
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: audiobookshelf-nfs-storage-backup
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
volumeMode: Filesystem
|
||||||
|
storageClassName: nfs-client
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: audiobookshelf-nfs-storage
|
name: audiobookshelf-nfs-storage
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf-config-backup-source
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: audiobookshelf-config-backup-source
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: audiobookshelf-config
|
||||||
|
trigger:
|
||||||
|
schedule: 0 4 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: audiobookshelf-config-backup-secret
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: audiobookshelf-metadata-backup-source
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: audiobookshelf-metadata-backup-source
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: audiobookshelf-metadata
|
||||||
|
trigger:
|
||||||
|
schedule: 0 4 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: audiobookshelf-metadata-backup-secret
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
@@ -9,7 +9,7 @@ audiobookshelf:
|
|||||||
main:
|
main:
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/advplyr/audiobookshelf
|
repository: ghcr.io/advplyr/audiobookshelf
|
||||||
tag: 2.31.0
|
tag: 2.30.0
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
@@ -21,7 +21,7 @@ audiobookshelf:
|
|||||||
apprise-api:
|
apprise-api:
|
||||||
image:
|
image:
|
||||||
repository: caronc/apprise
|
repository: caronc/apprise
|
||||||
tag: 1.3.0
|
tag: 1.2.6
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
@@ -59,7 +59,6 @@ audiobookshelf:
|
|||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
forceRename: audiobookshelf-config
|
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 2Gi
|
size: 2Gi
|
||||||
@@ -70,7 +69,6 @@ audiobookshelf:
|
|||||||
- path: /config
|
- path: /config
|
||||||
readOnly: false
|
readOnly: false
|
||||||
metadata:
|
metadata:
|
||||||
forceRename: audiobookshelf-metadata
|
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 10Gi
|
size: 10Gi
|
||||||
@@ -80,6 +78,13 @@ audiobookshelf:
|
|||||||
main:
|
main:
|
||||||
- path: /metadata
|
- path: /metadata
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
backup:
|
||||||
|
existingClaim: audiobookshelf-nfs-storage-backup
|
||||||
|
advancedMounts:
|
||||||
|
main:
|
||||||
|
main:
|
||||||
|
- path: /metadata/backups
|
||||||
|
readOnly: false
|
||||||
audiobooks:
|
audiobooks:
|
||||||
existingClaim: audiobookshelf-nfs-storage
|
existingClaim: audiobookshelf-nfs-storage
|
||||||
advancedMounts:
|
advancedMounts:
|
||||||
@@ -87,7 +92,3 @@ audiobookshelf:
|
|||||||
main:
|
main:
|
||||||
- path: /mnt/store/
|
- path: /mnt/store/
|
||||||
readOnly: false
|
readOnly: false
|
||||||
volsync-target-config:
|
|
||||||
pvcTarget: audiobookshelf-config
|
|
||||||
volsync-target-metadata:
|
|
||||||
pvcTarget: audiobookshelf-metadata
|
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: authentik
|
- name: authentik
|
||||||
repository: https://charts.goauthentik.io/
|
repository: https://charts.goauthentik.io/
|
||||||
version: 2025.10.3
|
version: 2025.10.2
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 7.1.3
|
version: 6.16.0
|
||||||
- name: redis-replication
|
digest: sha256:ad51c94c1125890ef60d179205d14c55eb9fdbc2702e3455e233042a48d00146
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-12-01T20:25:07.016724-06:00"
|
||||||
version: 0.5.0
|
|
||||||
digest: sha256:529f2ddaef6ef3584461ae31e4e3ffcc1146f19ece74ef054a7ddbc7eb36a0d8
|
|
||||||
generated: "2025-12-17T16:09:03.696627571Z"
|
|
||||||
|
|||||||
@@ -21,18 +21,15 @@ maintainers:
|
|||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: authentik
|
- name: authentik
|
||||||
version: 2025.10.3
|
version: 2025.10.2
|
||||||
repository: https://charts.goauthentik.io/
|
repository: https://charts.goauthentik.io/
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
alias: cloudflared
|
alias: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
alias: postgres-18-cluster
|
alias: postgres-17-cluster
|
||||||
version: 7.1.3
|
version: 6.16.0
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
- name: redis-replication
|
|
||||||
version: 0.5.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/authentik.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/authentik.png
|
||||||
appVersion: 2025.10.2
|
appVersion: 2025.4.1
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ spec:
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: authentik-postgresql-18-cluster-backup-secret
|
name: authentik-postgresql-17-cluster-backup-secret
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: authentik-postgresql-18-cluster-backup-secret
|
app.kubernetes.io/name: authentik-postgresql-17-cluster-backup-secret
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
@@ -77,10 +77,10 @@ spec:
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: authentik-postgresql-18-cluster-backup-secret-garage
|
name: authentik-postgresql-17-cluster-backup-secret-garage
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: authentik-postgresql-18-cluster-backup-secret-garage
|
app.kubernetes.io/name: authentik-postgresql-17-cluster-backup-secret-garage
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: redis.redis.opstreelabs.in/v1beta2
|
||||||
|
kind: RedisReplication
|
||||||
|
metadata:
|
||||||
|
name: redis-replication-authentik
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-replication-authentik
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
clusterSize: 3
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
kubernetesConfig:
|
||||||
|
image: quay.io/opstree/redis:v8.0.3
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
storage:
|
||||||
|
volumeClaimTemplate:
|
||||||
|
spec:
|
||||||
|
storageClassName: ceph-block
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
redisExporter:
|
||||||
|
enabled: true
|
||||||
|
image: quay.io/opstree/redis-exporter:v1.48.0
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: redis-replication-authentik
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-replication-authentik
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
redis-operator: "true"
|
||||||
|
env: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
redis_setup_type: replication
|
||||||
|
endpoints:
|
||||||
|
- port: redis-exporter
|
||||||
|
interval: 30s
|
||||||
|
scrapeTimeout: 10s
|
||||||
@@ -9,22 +9,22 @@ authentik:
|
|||||||
- name: AUTHENTIK_POSTGRESQL__HOST
|
- name: AUTHENTIK_POSTGRESQL__HOST
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: authentik-postgresql-18-cluster-app
|
name: authentik-postgresql-17-cluster-app
|
||||||
key: host
|
key: host
|
||||||
- name: AUTHENTIK_POSTGRESQL__NAME
|
- name: AUTHENTIK_POSTGRESQL__NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: authentik-postgresql-18-cluster-app
|
name: authentik-postgresql-17-cluster-app
|
||||||
key: dbname
|
key: dbname
|
||||||
- name: AUTHENTIK_POSTGRESQL__USER
|
- name: AUTHENTIK_POSTGRESQL__USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: authentik-postgresql-18-cluster-app
|
name: authentik-postgresql-17-cluster-app
|
||||||
key: user
|
key: user
|
||||||
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: authentik-postgresql-18-cluster-app
|
name: authentik-postgresql-17-cluster-app
|
||||||
key: password
|
key: password
|
||||||
authentik:
|
authentik:
|
||||||
redis:
|
redis:
|
||||||
@@ -50,65 +50,59 @@ authentik:
|
|||||||
enabled: false
|
enabled: false
|
||||||
cloudflared:
|
cloudflared:
|
||||||
existingSecretName: authentik-cloudflared-secret
|
existingSecretName: authentik-cloudflared-secret
|
||||||
postgres-18-cluster:
|
postgres-17-cluster:
|
||||||
mode: recovery
|
mode: recovery
|
||||||
cluster:
|
cluster:
|
||||||
storage:
|
storage:
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
walStorage:
|
walStorage:
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
|
monitoring:
|
||||||
|
enabled: true
|
||||||
|
prometheusRule:
|
||||||
|
enabled: true
|
||||||
recovery:
|
recovery:
|
||||||
method: objectStore
|
method: objectStore
|
||||||
objectStore:
|
objectStore:
|
||||||
destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-18-cluster
|
destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-17-cluster
|
||||||
endpointURL: http://garage-main.garage:3900
|
endpointURL: http://garage-main.garage:3900
|
||||||
index: 1
|
index: 1
|
||||||
endpointCredentials: authentik-postgresql-18-cluster-backup-secret-garage
|
endpointCredentials: authentik-postgresql-17-cluster-backup-secret-garage
|
||||||
backup:
|
backup:
|
||||||
objectStore:
|
objectStore:
|
||||||
|
- name: external
|
||||||
|
destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/authentik/authentik-postgresql-17-cluster
|
||||||
|
index: 1
|
||||||
|
retentionPolicy: "30d"
|
||||||
|
isWALArchiver: false
|
||||||
- name: garage-local
|
- name: garage-local
|
||||||
destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-18-cluster
|
destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-17-cluster
|
||||||
index: 1
|
index: 1
|
||||||
endpointURL: http://garage-main.garage:3900
|
endpointURL: http://garage-main.garage:3900
|
||||||
endpointCredentials: authentik-postgresql-18-cluster-backup-secret-garage
|
endpointCredentials: authentik-postgresql-17-cluster-backup-secret-garage
|
||||||
endpointCredentialsIncludeRegion: true
|
endpointCredentialsIncludeRegion: true
|
||||||
retentionPolicy: "3d"
|
retentionPolicy: "3d"
|
||||||
isWALArchiver: true
|
isWALArchiver: true
|
||||||
# - name: external
|
|
||||||
# destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/authentik/authentik-postgresql-18-cluster
|
|
||||||
# index: 1
|
|
||||||
# retentionPolicy: "30d"
|
|
||||||
# isWALArchiver: false
|
|
||||||
# - name: garage-remote
|
# - name: garage-remote
|
||||||
# destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-18-cluster
|
# destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-17-cluster
|
||||||
# index: 1
|
# index: 1
|
||||||
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
||||||
# endpointCredentials: authentik-postgresql-18-cluster-backup-secret-garage
|
# endpointCredentials: authentik-postgresql-17-cluster-backup-secret-garage
|
||||||
# retentionPolicy: "30d"
|
# retentionPolicy: "30d"
|
||||||
# data:
|
# data:
|
||||||
# compression: bzip2
|
# compression: bzip2
|
||||||
# jobs: 2
|
# jobs: 2
|
||||||
scheduledBackups:
|
scheduledBackups:
|
||||||
|
- name: daily-backup
|
||||||
|
suspend: false
|
||||||
|
schedule: "0 0 0 * * *"
|
||||||
|
backupName: external
|
||||||
- name: live-backup
|
- name: live-backup
|
||||||
suspend: false
|
suspend: false
|
||||||
immediate: true
|
immediate: true
|
||||||
schedule: "0 0 0 * * *"
|
schedule: "0 0 0 * * *"
|
||||||
backupName: garage-local
|
backupName: garage-local
|
||||||
# - name: daily-backup
|
|
||||||
# suspend: false
|
|
||||||
# immediate: true
|
|
||||||
# schedule: "0 0 0 * * *"
|
|
||||||
# backupName: external
|
|
||||||
# - name: weekly-backup
|
# - name: weekly-backup
|
||||||
# suspend: false
|
# suspend: false
|
||||||
# immediate: true
|
|
||||||
# schedule: "0 0 4 * * SAT"
|
# schedule: "0 0 4 * * SAT"
|
||||||
# backupName: garage-remote
|
# backupName: garage-remote
|
||||||
redis-replication:
|
|
||||||
existingSecret:
|
|
||||||
enabled: false
|
|
||||||
redisReplication:
|
|
||||||
clusterSize: 3
|
|
||||||
redisSentinel:
|
|
||||||
enabled: true
|
|
||||||
clusterSize: 3
|
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
digest: sha256:aa797b99d6d8b7aafe142811938408b7f234df6d429a7e076196337cc63876cb
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-12-01T20:25:09.888407-06:00"
|
||||||
version: 0.3.0
|
|
||||||
- name: volsync-target
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
version: 0.3.0
|
|
||||||
digest: sha256:13c950ad5cd6accd192e6768557c0df74af2cd767d2372dc38c1cdb7e1563399
|
|
||||||
generated: "2025-12-15T18:33:59.961957-06:00"
|
|
||||||
|
|||||||
@@ -16,14 +16,6 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: backrest
|
alias: backrest
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-config
|
|
||||||
version: 0.3.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-data
|
|
||||||
version: 0.3.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/backrest.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/backrest.png
|
||||||
appVersion: v1.10.1
|
appVersion: v1.10.1
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ backrest:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
persistence:
|
persistence:
|
||||||
data:
|
data:
|
||||||
forceRename: backrest-data
|
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 10Gi
|
size: 10Gi
|
||||||
@@ -46,7 +45,6 @@ backrest:
|
|||||||
- path: /data
|
- path: /data
|
||||||
readOnly: false
|
readOnly: false
|
||||||
config:
|
config:
|
||||||
forceRename: backrest-config
|
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 1Gi
|
size: 1Gi
|
||||||
@@ -84,7 +82,3 @@ backrest:
|
|||||||
main:
|
main:
|
||||||
- path: /mnt/share
|
- path: /mnt/share
|
||||||
readOnly: true
|
readOnly: true
|
||||||
volsync-target-data:
|
|
||||||
pvcTarget: backrest-data
|
|
||||||
volsync-target-config:
|
|
||||||
pvcTarget: backrest-config
|
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
digest: sha256:c6f6d1f2fb9fedf54094920737a6f0bd1a2ab89f0a4122966ca98f6c9d3f11fa
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-11-30T21:05:22.694344-06:00"
|
||||||
version: 0.5.0
|
|
||||||
digest: sha256:cb702f316026bdb487ace1abec56cc3c505376cf14a45528e3e593e4cc7effab
|
|
||||||
generated: "2025-12-15T19:04:05.574701-06:00"
|
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: bazarr
|
alias: bazarr
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-config
|
|
||||||
version: 0.5.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/bazarr.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/bazarr.png
|
||||||
appVersion: 1.5.3
|
appVersion: 1.5.2
|
||||||
|
|||||||
55
clusters/cl01tl/helm/bazarr/templates/external-secret.yaml
Normal file
55
clusters/cl01tl/helm/bazarr/templates/external-secret.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: bazarr-config-backup-secret
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: bazarr-config-backup-secret
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/bazarr/bazarr-config"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: S3_BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_DEFAULT_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: access_key
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: secret_key
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: bazarr-config-backup-source
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: bazarr-config-backup-source
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: bazarr-config
|
||||||
|
trigger:
|
||||||
|
schedule: 0 4 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: bazarr-config-backup-secret
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
moverSecurityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
@@ -15,7 +15,7 @@ bazarr:
|
|||||||
main:
|
main:
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/linuxserver/bazarr
|
repository: ghcr.io/linuxserver/bazarr
|
||||||
tag: 1.5.3@sha256:648f694532a3a53d8cf78bc888919ef538659bad41af4c680b0427ad1047d171
|
tag: 1.5.3@sha256:ec11e988e8e13411c994a4d9f43ed9b97409aa92c1da54d9f23926c3da7c2032
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
@@ -55,10 +55,3 @@ bazarr:
|
|||||||
main:
|
main:
|
||||||
- path: /mnt/store
|
- path: /mnt/store
|
||||||
readOnly: false
|
readOnly: false
|
||||||
volsync-target-config:
|
|
||||||
pvcTarget: bazarr-config
|
|
||||||
moverSecurityContext:
|
|
||||||
runAsUser: 1000
|
|
||||||
runAsGroup: 1000
|
|
||||||
fsGroup: 1000
|
|
||||||
fsGroupChangePolicy: OnRootMismatch
|
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: redis-replication
|
digest: sha256:0009729bcf7f1941401b767fd4ae952b7a8d44f80053090b4a9224de912a14ef
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-12-01T20:25:13.511406-06:00"
|
||||||
version: 0.5.0
|
|
||||||
digest: sha256:a7840240d52d7c66aa2e542132e32907dd0c48d3051eb15190a209215cbd4dce
|
|
||||||
generated: "2025-12-15T20:06:31.995318697Z"
|
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: blocky
|
alias: blocky
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: redis-replication
|
|
||||||
version: 0.5.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/blocky.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/blocky.png
|
||||||
appVersion: v0.28.2
|
appVersion: v0.25
|
||||||
|
|||||||
32
clusters/cl01tl/helm/blocky/templates/redis-replication.yaml
Normal file
32
clusters/cl01tl/helm/blocky/templates/redis-replication.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: redis.redis.opstreelabs.in/v1beta2
|
||||||
|
kind: RedisReplication
|
||||||
|
metadata:
|
||||||
|
name: redis-replication-blocky
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-replication-blocky
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
clusterSize: 3
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
kubernetesConfig:
|
||||||
|
image: quay.io/opstree/redis:v8.0.3
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
storage:
|
||||||
|
volumeClaimTemplate:
|
||||||
|
spec:
|
||||||
|
storageClassName: ceph-block
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
redisExporter:
|
||||||
|
enabled: true
|
||||||
|
image: quay.io/opstree/redis-exporter:v1.48.0
|
||||||
@@ -17,3 +17,24 @@ spec:
|
|||||||
interval: 30s
|
interval: 30s
|
||||||
scrapeTimeout: 10s
|
scrapeTimeout: 10s
|
||||||
path: /metrics
|
path: /metrics
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: redis-replication-blocky
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-replication-blocky
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
redis-operator: "true"
|
||||||
|
env: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
redis_setup_type: replication
|
||||||
|
endpoints:
|
||||||
|
- port: redis-exporter
|
||||||
|
interval: 30s
|
||||||
|
scrapeTimeout: 10s
|
||||||
|
|||||||
@@ -129,10 +129,10 @@ blocky:
|
|||||||
huntarr IN CNAME traefik-cl01tl
|
huntarr IN CNAME traefik-cl01tl
|
||||||
immich IN CNAME traefik-cl01tl
|
immich IN CNAME traefik-cl01tl
|
||||||
jellyfin IN CNAME traefik-cl01tl
|
jellyfin IN CNAME traefik-cl01tl
|
||||||
jellyfin-vue IN CNAME traefik-cl01tl
|
|
||||||
jellystat IN CNAME traefik-cl01tl
|
jellystat IN CNAME traefik-cl01tl
|
||||||
kiwix IN CNAME traefik-cl01tl
|
kiwix IN CNAME traefik-cl01tl
|
||||||
komodo IN CNAME traefik-cl01tl
|
komodo IN CNAME traefik-cl01tl
|
||||||
|
kronic IN CNAME traefik-cl01tl
|
||||||
lidarr IN CNAME traefik-cl01tl
|
lidarr IN CNAME traefik-cl01tl
|
||||||
lidatube IN CNAME traefik-cl01tl
|
lidatube IN CNAME traefik-cl01tl
|
||||||
listenarr IN CNAME traefik-cl01tl
|
listenarr IN CNAME traefik-cl01tl
|
||||||
@@ -143,6 +143,7 @@ blocky:
|
|||||||
ollama IN CNAME traefik-cl01tl
|
ollama IN CNAME traefik-cl01tl
|
||||||
omni-tools IN CNAME traefik-cl01tl
|
omni-tools IN CNAME traefik-cl01tl
|
||||||
overseerr IN CNAME traefik-cl01tl
|
overseerr IN CNAME traefik-cl01tl
|
||||||
|
pgadmin IN CNAME traefik-cl01tl
|
||||||
photoview IN CNAME traefik-cl01tl
|
photoview IN CNAME traefik-cl01tl
|
||||||
plex IN CNAME traefik-cl01tl
|
plex IN CNAME traefik-cl01tl
|
||||||
postiz IN CNAME traefik-cl01tl
|
postiz IN CNAME traefik-cl01tl
|
||||||
@@ -155,7 +156,6 @@ blocky:
|
|||||||
radarr-anime IN CNAME traefik-cl01tl
|
radarr-anime IN CNAME traefik-cl01tl
|
||||||
radarr-standup IN CNAME traefik-cl01tl
|
radarr-standup IN CNAME traefik-cl01tl
|
||||||
searxng IN CNAME traefik-cl01tl
|
searxng IN CNAME traefik-cl01tl
|
||||||
seerr IN CNAME traefik-cl01tl
|
|
||||||
slskd IN CNAME traefik-cl01tl
|
slskd IN CNAME traefik-cl01tl
|
||||||
sonarr IN CNAME traefik-cl01tl
|
sonarr IN CNAME traefik-cl01tl
|
||||||
sonarr-4k IN CNAME traefik-cl01tl
|
sonarr-4k IN CNAME traefik-cl01tl
|
||||||
@@ -301,10 +301,3 @@ blocky:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
mountPropagation: None
|
mountPropagation: None
|
||||||
subPath: config.yml
|
subPath: config.yml
|
||||||
redis-replication:
|
|
||||||
existingSecret:
|
|
||||||
enabled: false
|
|
||||||
redisReplication:
|
|
||||||
clusterSize: 3
|
|
||||||
redisSentinel:
|
|
||||||
enabled: false
|
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: mariadb-cluster
|
- name: mariadb-cluster
|
||||||
repository: https://helm.mariadb.com/mariadb-operator
|
repository: https://helm.mariadb.com/mariadb-operator
|
||||||
version: 25.10.2
|
version: 25.10.2
|
||||||
- name: volsync-target
|
digest: sha256:264725306c1d1f38140293c0820abdc7e8aa4f39764b4d91e20200705ce2ec91
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-11-30T21:05:24.649316-06:00"
|
||||||
version: 0.5.0
|
|
||||||
- name: volsync-target
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
version: 0.5.0
|
|
||||||
digest: sha256:6981b2c060c19bac6517578bd9b5b11a300a4deb431110bf90da317237a4a252
|
|
||||||
generated: "2025-12-15T19:15:49.886575-06:00"
|
|
||||||
|
|||||||
@@ -16,17 +16,9 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: booklore
|
alias: booklore
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: mariadb-cluster
|
- name: mariadb-cluster
|
||||||
version: 25.10.2
|
version: 25.10.2
|
||||||
repository: https://helm.mariadb.com/mariadb-operator
|
repository: https://helm.mariadb.com/mariadb-operator
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-config
|
|
||||||
version: 0.5.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-data
|
|
||||||
version: 0.5.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/booklore.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/booklore.png
|
||||||
appVersion: v1.13.2
|
appVersion: v.1.10.0
|
||||||
|
|||||||
@@ -43,6 +43,234 @@ spec:
|
|||||||
metadataPolicy: None
|
metadataPolicy: None
|
||||||
property: psk.txt
|
property: psk.txt
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: booklore-config-backup-secret
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: booklore-config-backup-secret
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/booklore/booklore-config"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /volsync/restic/digital-ocean
|
||||||
|
metadataPolicy: None
|
||||||
|
property: BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /volsync/restic/digital-ocean
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_DEFAULT_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_ACCESS_KEY_ID
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: booklore-data-backup-secret-local
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: booklore-data-backup-secret-local
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/booklore/booklore-data"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /volsync/restic/garage-local
|
||||||
|
metadataPolicy: None
|
||||||
|
property: BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /volsync/restic/garage-local
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /garage/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: ACCESS_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /garage/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: ACCESS_KEY_ID
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /garage/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: ACCESS_SECRET_KEY
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: booklore-data-backup-secret-remote
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: booklore-data-backup-secret-remote
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/booklore/booklore-data"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /volsync/restic/garage-remote
|
||||||
|
metadataPolicy: None
|
||||||
|
property: BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /volsync/restic/garage-remote
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /garage/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: ACCESS_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /garage/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: ACCESS_KEY_ID
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /garage/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: ACCESS_SECRET_KEY
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: booklore-data-backup-secret-external
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: booklore-data-backup-secret-external
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/booklore/booklore-data"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /volsync/restic/digital-ocean
|
||||||
|
metadataPolicy: None
|
||||||
|
property: BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /volsync/restic/digital-ocean
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_DEFAULT_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_ACCESS_KEY_ID
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
|
|||||||
@@ -8,6 +8,3 @@ metadata:
|
|||||||
app.kubernetes.io/name: booklore
|
app.kubernetes.io/name: booklore
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
pod-security.kubernetes.io/audit: privileged
|
|
||||||
pod-security.kubernetes.io/enforce: privileged
|
|
||||||
pod-security.kubernetes.io/warn: privileged
|
|
||||||
|
|||||||
@@ -15,3 +15,115 @@ spec:
|
|||||||
keySecret: booklore-data-replication-secret
|
keySecret: booklore-data-replication-secret
|
||||||
address: volsync-rsync-tls-dst-booklore-data-replication-destination
|
address: volsync-rsync-tls-dst-booklore-data-replication-destination
|
||||||
copyMethod: Snapshot
|
copyMethod: Snapshot
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: booklore-config-backup-source
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: booklore-config-backup-source
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: booklore-config
|
||||||
|
trigger:
|
||||||
|
schedule: 0 4 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: booklore-config-backup-secret
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
|
cacheCapacity: 10Gi
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: booklore-data-backup-source-local
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: booklore-data-backup-source-local
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: booklore-data
|
||||||
|
trigger:
|
||||||
|
schedule: 0 2 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: booklore-data-backup-secret-local
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
|
cacheCapacity: 10Gi
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: booklore-data-backup-source-remote
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: booklore-data-backup-source-remote
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: booklore-data
|
||||||
|
trigger:
|
||||||
|
schedule: 0 3 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: booklore-data-backup-secret-remote
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
|
cacheCapacity: 10Gi
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: booklore-data-backup-source-external
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: booklore-data-backup-source-external
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: booklore-data
|
||||||
|
trigger:
|
||||||
|
schedule: 0 4 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: booklore-data-backup-secret-external
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
|
cacheCapacity: 10Gi
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ booklore:
|
|||||||
main:
|
main:
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/booklore-app/booklore
|
repository: ghcr.io/booklore-app/booklore
|
||||||
tag: v1.13.2
|
tag: v1.12.0
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
@@ -41,7 +41,6 @@ booklore:
|
|||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
forceRename: booklore-config
|
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 5Gi
|
size: 5Gi
|
||||||
@@ -52,7 +51,6 @@ booklore:
|
|||||||
- path: /app/data
|
- path: /app/data
|
||||||
readOnly: false
|
readOnly: false
|
||||||
data:
|
data:
|
||||||
forceRename: booklore-data
|
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 10Gi
|
size: 10Gi
|
||||||
@@ -121,8 +119,7 @@ mariadb-cluster:
|
|||||||
suspend: false
|
suspend: false
|
||||||
immediate: true
|
immediate: true
|
||||||
compression: gzip
|
compression: gzip
|
||||||
maxRetention: 2160h
|
maxRetention: 720h
|
||||||
successfulJobsHistoryLimit: 1
|
|
||||||
storage:
|
storage:
|
||||||
s3:
|
s3:
|
||||||
bucket: mariadb-backups-b230a2f5aecf080a4b372c08
|
bucket: mariadb-backups-b230a2f5aecf080a4b372c08
|
||||||
@@ -137,28 +134,6 @@ mariadb-cluster:
|
|||||||
key: secret
|
key: secret
|
||||||
tls:
|
tls:
|
||||||
enabled: true
|
enabled: true
|
||||||
- name: backup-remote
|
|
||||||
schedule:
|
|
||||||
cron: "0 0 * * 0"
|
|
||||||
suspend: false
|
|
||||||
immediate: true
|
|
||||||
compression: gzip
|
|
||||||
maxRetention: 2160h
|
|
||||||
successfulJobsHistoryLimit: 1
|
|
||||||
storage:
|
|
||||||
s3:
|
|
||||||
bucket: mariadb-backups
|
|
||||||
prefix: cl01tl/booklore
|
|
||||||
endpoint: garage-ps10rp.boreal-beaufort.ts.net:3900
|
|
||||||
region: us-east-1
|
|
||||||
accessKeyIdSecretKeyRef:
|
|
||||||
name: booklore-mariadb-cluster-backup-secret-garage
|
|
||||||
key: access
|
|
||||||
secretAccessKeySecretKeyRef:
|
|
||||||
name: booklore-mariadb-cluster-backup-secret-garage
|
|
||||||
key: secret
|
|
||||||
tls:
|
|
||||||
enabled: true
|
|
||||||
- name: backup-garage
|
- name: backup-garage
|
||||||
schedule:
|
schedule:
|
||||||
cron: "0 0 * * *"
|
cron: "0 0 * * *"
|
||||||
@@ -166,7 +141,6 @@ mariadb-cluster:
|
|||||||
immediate: true
|
immediate: true
|
||||||
compression: gzip
|
compression: gzip
|
||||||
maxRetention: 360h
|
maxRetention: 360h
|
||||||
successfulJobsHistoryLimit: 1
|
|
||||||
storage:
|
storage:
|
||||||
s3:
|
s3:
|
||||||
bucket: mariadb-backups
|
bucket: mariadb-backups
|
||||||
@@ -179,16 +153,3 @@ mariadb-cluster:
|
|||||||
secretAccessKeySecretKeyRef:
|
secretAccessKeySecretKeyRef:
|
||||||
name: booklore-mariadb-cluster-backup-secret-garage
|
name: booklore-mariadb-cluster-backup-secret-garage
|
||||||
key: secret
|
key: secret
|
||||||
volsync-target-config:
|
|
||||||
pvcTarget: booklore-config
|
|
||||||
volsync-target-data:
|
|
||||||
pvcTarget: booklore-data
|
|
||||||
local:
|
|
||||||
restic:
|
|
||||||
cacheCapacity: 10Gi
|
|
||||||
remote:
|
|
||||||
restic:
|
|
||||||
cacheCapacity: 10Gi
|
|
||||||
external:
|
|
||||||
restic:
|
|
||||||
cacheCapacity: 10Gi
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: cert-manager
|
- name: cert-manager
|
||||||
repository: https://charts.jetstack.io
|
repository: https://charts.jetstack.io
|
||||||
version: v1.19.2
|
version: v1.19.1
|
||||||
digest: sha256:b02bda9b9f2fc886af11d017a27a5761513defee603f9e3aa1d7add2749b925c
|
digest: sha256:0b1238a5552bc6d457d4b1a2a1f387a3e7f2c19f820ecb64e14d20481a1ed1ce
|
||||||
generated: "2025-12-10T15:01:57.196895547Z"
|
generated: "2025-12-01T20:25:17.762628-06:00"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ maintainers:
|
|||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: cert-manager
|
- name: cert-manager
|
||||||
version: v1.19.2
|
version: v1.19.1
|
||||||
repository: https://charts.jetstack.io
|
repository: https://charts.jetstack.io
|
||||||
icon: https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/cert-manager.png
|
icon: https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/cert-manager.png
|
||||||
appVersion: v1.19.2
|
appVersion: v1.17.2
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: cilium
|
- name: cilium
|
||||||
repository: https://helm.cilium.io/
|
repository: https://helm.cilium.io/
|
||||||
version: 1.18.5
|
version: 1.18.4
|
||||||
digest: sha256:b997853961dca1ed43d32b58b17e6e592581eb555db0b1457b168251cf3aaa45
|
digest: sha256:e38eb92ee87c9a52b0f45a2451142ade02bac7d484b246d32379eacce3800bc8
|
||||||
generated: "2025-12-17T16:05:05.870297681Z"
|
generated: "2025-12-02T17:17:49.043599-06:00"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ maintainers:
|
|||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: cilium
|
- name: cilium
|
||||||
version: 1.18.5
|
version: 1.18.4
|
||||||
repository: https://helm.cilium.io/
|
repository: https://helm.cilium.io/
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/cilium.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/cilium.png
|
||||||
appVersion: 1.18.4
|
appVersion: 1.17.3
|
||||||
|
|||||||
@@ -55,9 +55,6 @@ cilium:
|
|||||||
metrics:
|
metrics:
|
||||||
serviceMonitor:
|
serviceMonitor:
|
||||||
enabled: true
|
enabled: true
|
||||||
tls:
|
|
||||||
auto:
|
|
||||||
method: cronJob
|
|
||||||
relay:
|
relay:
|
||||||
enabled: true
|
enabled: true
|
||||||
metrics:
|
metrics:
|
||||||
@@ -78,7 +75,6 @@ cilium:
|
|||||||
prometheus:
|
prometheus:
|
||||||
enabled: true
|
enabled: true
|
||||||
serviceMonitor:
|
serviceMonitor:
|
||||||
trustCRDsExist: true
|
|
||||||
enabled: true
|
enabled: true
|
||||||
envoy:
|
envoy:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: cloudnative-pg
|
- name: cloudnative-pg
|
||||||
repository: https://cloudnative-pg.io/charts/
|
repository: https://cloudnative-pg.io/charts/
|
||||||
version: 0.27.0
|
version: 0.26.1
|
||||||
- name: plugin-barman-cloud
|
- name: plugin-barman-cloud
|
||||||
repository: https://cloudnative-pg.io/charts/
|
repository: https://cloudnative-pg.io/charts/
|
||||||
version: 0.3.1
|
version: 0.3.1
|
||||||
digest: sha256:14aa30b7bf75571b03bda19af68cd50c1e7908b883351b196a260609a5b85551
|
digest: sha256:b38e5104d77ab1737a27a2542eda958e82038443940f07b7c2cbe3b0a477e1e6
|
||||||
generated: "2025-12-10T19:25:17.952954019Z"
|
generated: "2025-12-01T20:25:20.341325-06:00"
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ maintainers:
|
|||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: cloudnative-pg
|
- name: cloudnative-pg
|
||||||
version: 0.27.0
|
version: 0.26.1
|
||||||
repository: https://cloudnative-pg.io/charts/
|
repository: https://cloudnative-pg.io/charts/
|
||||||
- name: plugin-barman-cloud
|
- name: plugin-barman-cloud
|
||||||
version: 0.3.1
|
version: 0.3.1
|
||||||
repository: https://cloudnative-pg.io/charts/
|
repository: https://cloudnative-pg.io/charts/
|
||||||
icon: https://avatars.githubusercontent.com/u/100373852?s=200&v=4
|
icon: https://avatars.githubusercontent.com/u/100373852?s=200&v=4
|
||||||
appVersion: 1.28.0
|
appVersion: 1.26.0
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
- name: volsync-target
|
digest: sha256:99eb4f940077dc916f5425d196232fcd363223fa7b7b5d3889f5965aa59e26f5
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-11-30T21:05:26.699161-06:00"
|
||||||
version: 0.5.0
|
|
||||||
digest: sha256:bd1cbd66ccb360978a342ee218bfb01006a486fb85c5714acd593b9e1389b151
|
|
||||||
generated: "2025-12-15T21:50:58.968382-06:00"
|
|
||||||
|
|||||||
@@ -19,14 +19,10 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: code-server
|
alias: code-server
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
alias: cloudflared
|
alias: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-config
|
|
||||||
version: 0.5.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/visual-studio-code.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/visual-studio-code.png
|
||||||
appVersion: 4.106.3
|
appVersion: 4.100.2
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: code-server-nfs-storage
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: code-server-nfs-storage
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
volumeMode: Filesystem
|
||||||
|
storageClassName: nfs-client
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
@@ -9,7 +9,7 @@ code-server:
|
|||||||
main:
|
main:
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/linuxserver/code-server
|
repository: ghcr.io/linuxserver/code-server
|
||||||
tag: 4.106.3@sha256:83793e4460090d6c46f4842ff6ab8aa26ad8a567885112bbe754b45c61935055
|
tag: 4.106.2@sha256:a98afdbcb59559f11e5e8df284062e55da1076b2e470e13db4aae133ea82bad0
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
@@ -37,11 +37,7 @@ code-server:
|
|||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
forceRename: code-server-config
|
existingClaim: code-server-nfs-storage
|
||||||
storageClass: ceph-block
|
|
||||||
accessMode: ReadWriteOnce
|
|
||||||
size: 2Gi
|
|
||||||
retain: true
|
|
||||||
advancedMounts:
|
advancedMounts:
|
||||||
main:
|
main:
|
||||||
main:
|
main:
|
||||||
@@ -49,10 +45,3 @@ code-server:
|
|||||||
readOnly: false
|
readOnly: false
|
||||||
cloudflared:
|
cloudflared:
|
||||||
existingSecretName: code-server-cloudflared-secret
|
existingSecretName: code-server-cloudflared-secret
|
||||||
volsync-target-config:
|
|
||||||
pvcTarget: code-server-config
|
|
||||||
moverSecurityContext:
|
|
||||||
runAsUser: 1000
|
|
||||||
runAsGroup: 1000
|
|
||||||
fsGroup: 1000
|
|
||||||
fsGroupChangePolicy: OnRootMismatch
|
|
||||||
|
|||||||
@@ -18,4 +18,4 @@ dependencies:
|
|||||||
version: 1.45.0
|
version: 1.45.0
|
||||||
repository: https://coredns.github.io/helm
|
repository: https://coredns.github.io/helm
|
||||||
icon: https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/coredns.png
|
icon: https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/coredns.png
|
||||||
appVersion: v1.13.2
|
appVersion: v1.12.1
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ dependencies:
|
|||||||
version: 0.34.0
|
version: 0.34.0
|
||||||
repository: https://kubernetes-sigs.github.io/descheduler/
|
repository: https://kubernetes-sigs.github.io/descheduler/
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
||||||
appVersion: 0.34.0
|
appVersion: 0.33.0
|
||||||
|
|||||||
@@ -39,27 +39,16 @@ descheduler:
|
|||||||
- name: RemovePodsViolatingNodeTaints
|
- name: RemovePodsViolatingNodeTaints
|
||||||
- name: RemovePodsViolatingInterPodAntiAffinity
|
- name: RemovePodsViolatingInterPodAntiAffinity
|
||||||
- name: RemovePodsViolatingTopologySpreadConstraint
|
- name: RemovePodsViolatingTopologySpreadConstraint
|
||||||
- name: "HighNodeUtilization"
|
|
||||||
args:
|
|
||||||
thresholds:
|
|
||||||
cpu : 80
|
|
||||||
memory: 80
|
|
||||||
pods: 90
|
|
||||||
evictableNamespaces:
|
|
||||||
exclude:
|
|
||||||
- "kube-system"
|
|
||||||
evictionModes:
|
|
||||||
- "OnlyThresholdingResources"
|
|
||||||
- name: LowNodeUtilization
|
- name: LowNodeUtilization
|
||||||
args:
|
args:
|
||||||
thresholds:
|
thresholds:
|
||||||
cpu: 30
|
cpu: 20
|
||||||
memory: 30
|
memory: 20
|
||||||
pods: 50
|
pods: 20
|
||||||
targetThresholds:
|
targetThresholds:
|
||||||
cpu: 60
|
cpu: 60
|
||||||
memory: 40
|
memory: 60
|
||||||
pods: 80
|
pods: 60
|
||||||
plugins:
|
plugins:
|
||||||
balance:
|
balance:
|
||||||
enabled:
|
enabled:
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 7.1.3
|
version: 6.16.0
|
||||||
- name: redis-replication
|
digest: sha256:2f3d9f7a8d8d71b19ff3292993647d22a89aa6c444a6f0819b82cd0a577f1ebc
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-11-30T21:05:28.43692-06:00"
|
||||||
version: 0.5.0
|
|
||||||
digest: sha256:984cd51b50663cda85c4861949d2dc724de730a415344936a4fe39745aca31d3
|
|
||||||
generated: "2025-12-17T16:09:15.230017239Z"
|
|
||||||
|
|||||||
@@ -20,17 +20,14 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: directus
|
alias: directus
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
alias: cloudflared-directus
|
alias: cloudflared-directus
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
alias: postgres-18-cluster
|
alias: postgres-17-cluster
|
||||||
version: 7.1.3
|
version: 6.16.0
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
- name: redis-replication
|
|
||||||
version: 0.5.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/directus.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/directus.png
|
||||||
appVersion: 11.14.0
|
appVersion: 11.7.2
|
||||||
|
|||||||
@@ -151,10 +151,10 @@ spec:
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: directus-postgresql-18-cluster-backup-secret
|
name: directus-postgresql-17-cluster-backup-secret
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: directus-postgresql-18-cluster-backup-secret
|
app.kubernetes.io/name: directus-postgresql-17-cluster-backup-secret
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
@@ -181,10 +181,40 @@ spec:
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: directus-postgresql-18-cluster-backup-secret-garage
|
name: directus-postgresql-17-cluster-backup-secret-weekly
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: directus-postgresql-18-cluster-backup-secret-garage
|
app.kubernetes.io/name: directus-postgresql-17-cluster-backup-secret-weekly
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
data:
|
||||||
|
- secretKey: ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /garage/home-infra/postgres-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: ACCESS_KEY_ID
|
||||||
|
- secretKey: ACCESS_SECRET_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /garage/home-infra/postgres-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: ACCESS_SECRET_KEY
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: directus-postgresql-17-cluster-backup-secret-garage
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: directus-postgresql-17-cluster-backup-secret-garage
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: redis.redis.opstreelabs.in/v1beta2
|
||||||
|
kind: RedisReplication
|
||||||
|
metadata:
|
||||||
|
name: redis-replication-directus
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-replication-directus
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
clusterSize: 3
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
kubernetesConfig:
|
||||||
|
image: quay.io/opstree/redis:v8.2.1
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
redisSecret:
|
||||||
|
name: directus-redis-config
|
||||||
|
key: password
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
storage:
|
||||||
|
volumeClaimTemplate:
|
||||||
|
spec:
|
||||||
|
storageClassName: ceph-block
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
redisExporter:
|
||||||
|
enabled: true
|
||||||
|
image: quay.io/opstree/redis-exporter:v1.76.0
|
||||||
30
clusters/cl01tl/helm/directus/templates/redis-sentinel.yaml
Normal file
30
clusters/cl01tl/helm/directus/templates/redis-sentinel.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
apiVersion: redis.redis.opstreelabs.in/v1beta2
|
||||||
|
kind: RedisSentinel
|
||||||
|
metadata:
|
||||||
|
name: redis-sentinel-directus
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-sentinel-directus
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
clusterSize: 3
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
redisSentinelConfig:
|
||||||
|
redisReplicationName: redis-replication-directus
|
||||||
|
redisReplicationPassword:
|
||||||
|
secretKeyRef:
|
||||||
|
name: directus-redis-config
|
||||||
|
key: password
|
||||||
|
kubernetesConfig:
|
||||||
|
image: quay.io/opstree/redis-sentinel:v7.0.15
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
redisSecret:
|
||||||
|
name: directus-redis-config
|
||||||
|
key: password
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 128Mi
|
||||||
@@ -20,3 +20,24 @@ spec:
|
|||||||
bearerTokenSecret:
|
bearerTokenSecret:
|
||||||
name: directus-metric-token
|
name: directus-metric-token
|
||||||
key: metric-token
|
key: metric-token
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: redis-replication-directus
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-replication-directus
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
redis-operator: "true"
|
||||||
|
env: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
redis_setup_type: replication
|
||||||
|
endpoints:
|
||||||
|
- port: redis-exporter
|
||||||
|
interval: 30s
|
||||||
|
scrapeTimeout: 10s
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ directus:
|
|||||||
main:
|
main:
|
||||||
image:
|
image:
|
||||||
repository: directus/directus
|
repository: directus/directus
|
||||||
tag: 11.14.0
|
tag: 11.13.4
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: PUBLIC_URL
|
- name: PUBLIC_URL
|
||||||
@@ -41,27 +41,27 @@ directus:
|
|||||||
- name: DB_HOST
|
- name: DB_HOST
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: directus-postgresql-18-cluster-app
|
name: directus-postgresql-17-cluster-app
|
||||||
key: host
|
key: host
|
||||||
- name: DB_DATABASE
|
- name: DB_DATABASE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: directus-postgresql-18-cluster-app
|
name: directus-postgresql-17-cluster-app
|
||||||
key: dbname
|
key: dbname
|
||||||
- name: DB_PORT
|
- name: DB_PORT
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: directus-postgresql-18-cluster-app
|
name: directus-postgresql-17-cluster-app
|
||||||
key: port
|
key: port
|
||||||
- name: DB_USER
|
- name: DB_USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: directus-postgresql-18-cluster-app
|
name: directus-postgresql-17-cluster-app
|
||||||
key: user
|
key: user
|
||||||
- name: DB_PASSWORD
|
- name: DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: directus-postgresql-18-cluster-app
|
name: directus-postgresql-17-cluster-app
|
||||||
key: password
|
key: password
|
||||||
- name: SYNCHRONIZATION_STORE
|
- name: SYNCHRONIZATION_STORE
|
||||||
value: redis
|
value: redis
|
||||||
@@ -156,67 +156,59 @@ directus:
|
|||||||
cloudflared-directus:
|
cloudflared-directus:
|
||||||
name: cloudflared-directus
|
name: cloudflared-directus
|
||||||
existingSecretName: directus-cloudflared-secret
|
existingSecretName: directus-cloudflared-secret
|
||||||
postgres-18-cluster:
|
postgres-17-cluster:
|
||||||
mode: recovery
|
mode: recovery
|
||||||
cluster:
|
cluster:
|
||||||
storage:
|
storage:
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
walStorage:
|
walStorage:
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
|
monitoring:
|
||||||
|
enabled: true
|
||||||
|
prometheusRule:
|
||||||
|
enabled: true
|
||||||
recovery:
|
recovery:
|
||||||
method: objectStore
|
method: objectStore
|
||||||
objectStore:
|
objectStore:
|
||||||
destinationPath: s3://postgres-backups/cl01tl/directus/directus-postgresql-18-cluster
|
destinationPath: s3://postgres-backups/cl01tl/directus/directus-postgresql-17-cluster
|
||||||
endpointURL: http://garage-main.garage:3900
|
endpointURL: http://garage-main.garage:3900
|
||||||
index: 1
|
index: 1
|
||||||
endpointCredentials: directus-postgresql-18-cluster-backup-secret-garage
|
endpointCredentials: directus-postgresql-17-cluster-backup-secret-garage
|
||||||
backup:
|
backup:
|
||||||
objectStore:
|
objectStore:
|
||||||
|
- name: external
|
||||||
|
destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/directus/directus-postgresql-17-cluster
|
||||||
|
index: 1
|
||||||
|
retentionPolicy: "30d"
|
||||||
|
isWALArchiver: false
|
||||||
- name: garage-local
|
- name: garage-local
|
||||||
destinationPath: s3://postgres-backups/cl01tl/directus/directus-postgresql-18-cluster
|
destinationPath: s3://postgres-backups/cl01tl/directus/directus-postgresql-17-cluster
|
||||||
index: 1
|
index: 1
|
||||||
endpointURL: http://garage-main.garage:3900
|
endpointURL: http://garage-main.garage:3900
|
||||||
endpointCredentials: directus-postgresql-18-cluster-backup-secret-garage
|
endpointCredentials: directus-postgresql-17-cluster-backup-secret-garage
|
||||||
endpointCredentialsIncludeRegion: true
|
endpointCredentialsIncludeRegion: true
|
||||||
retentionPolicy: "3d"
|
retentionPolicy: "3d"
|
||||||
isWALArchiver: true
|
isWALArchiver: true
|
||||||
# - name: external
|
|
||||||
# destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/directus/directus-postgresql-18-cluster
|
|
||||||
# index: 1
|
|
||||||
# retentionPolicy: "30d"
|
|
||||||
# isWALArchiver: false
|
|
||||||
# - name: garage-remote
|
# - name: garage-remote
|
||||||
# destinationPath: s3://postgres-backups/cl01tl/directus/directus-postgresql-18-cluster
|
# destinationPath: s3://postgres-backups/cl01tl/directus/directus-postgresql-17-cluster
|
||||||
# index: 1
|
# index: 1
|
||||||
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
||||||
# endpointCredentials: directus-postgresql-18-cluster-backup-secret-garage
|
# endpointCredentials: directus-postgresql-17-cluster-backup-secret-garage
|
||||||
# retentionPolicy: "30d"
|
# retentionPolicy: "30d"
|
||||||
# data:
|
# data:
|
||||||
# compression: bzip2
|
# compression: bzip2
|
||||||
# jobs: 2
|
# jobs: 2
|
||||||
scheduledBackups:
|
scheduledBackups:
|
||||||
|
- name: daily-backup
|
||||||
|
suspend: false
|
||||||
|
schedule: "0 0 0 * * *"
|
||||||
|
backupName: external
|
||||||
- name: live-backup
|
- name: live-backup
|
||||||
suspend: false
|
suspend: false
|
||||||
immediate: true
|
immediate: true
|
||||||
schedule: "0 0 0 * * *"
|
schedule: "0 0 0 * * *"
|
||||||
backupName: garage-local
|
backupName: garage-local
|
||||||
# - name: daily-backup
|
|
||||||
# suspend: false
|
|
||||||
# immediate: true
|
|
||||||
# schedule: "0 0 0 * * *"
|
|
||||||
# backupName: external
|
|
||||||
# - name: weekly-backup
|
# - name: weekly-backup
|
||||||
# suspend: false
|
# suspend: false
|
||||||
# immediate: true
|
|
||||||
# schedule: "0 0 4 * * SAT"
|
# schedule: "0 0 4 * * SAT"
|
||||||
# backupName: garage-remote
|
# backupName: garage-remote
|
||||||
redis-replication:
|
|
||||||
existingSecret:
|
|
||||||
enabled: true
|
|
||||||
name: directus-redis-config
|
|
||||||
key: password
|
|
||||||
redisReplication:
|
|
||||||
clusterSize: 3
|
|
||||||
redisSentinel:
|
|
||||||
enabled: true
|
|
||||||
clusterSize: 3
|
|
||||||
|
|||||||
@@ -18,4 +18,4 @@ dependencies:
|
|||||||
version: 3.2.0
|
version: 3.2.0
|
||||||
repository: https://helm.elastic.co
|
repository: https://helm.elastic.co
|
||||||
icon: https://helm.elastic.co/icons/eck.png
|
icon: https://helm.elastic.co/icons/eck.png
|
||||||
appVersion: v3.2.0
|
appVersion: 1.26.0
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: element-web
|
- name: element-web
|
||||||
repository: https://ananace.gitlab.io/charts
|
repository: https://ananace.gitlab.io/charts
|
||||||
version: 1.4.26
|
version: 1.4.24
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
digest: sha256:f9196cbede894c6da6ecedd9ae05d3f1fd0e20304eca8ca38c18334a923b2235
|
digest: sha256:05aa032adca6d808215d6dcd5d7e38b821a740a53868238f79adaa606444b3ae
|
||||||
generated: "2025-12-07T02:54:29.895481505Z"
|
generated: "2025-11-30T21:05:30.356497-06:00"
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ maintainers:
|
|||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: element-web
|
- name: element-web
|
||||||
version: 1.4.26
|
version: 1.4.24
|
||||||
repository: https://ananace.gitlab.io/charts
|
repository: https://ananace.gitlab.io/charts
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
alias: cloudflared
|
alias: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/element.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/element.png
|
||||||
appVersion: v1.12.6
|
appVersion: v1.11.100
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ element-web:
|
|||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
image:
|
image:
|
||||||
repository: vectorim/element-web
|
repository: vectorim/element-web
|
||||||
tag: v1.12.7
|
tag: v1.12.4
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
defaultServer:
|
defaultServer:
|
||||||
url: https://matrix.alexlebens.dev
|
url: https://matrix.alexlebens.dev
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
digest: sha256:9900009eb6415344d8c5387371a0052259092d92f34c21774f6a6abe9f11f43e
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-11-30T21:05:32.524168-06:00"
|
||||||
version: 0.3.0
|
|
||||||
digest: sha256:476021b852fbbd829570bcb88309eea92bd096cb4ec79efe2d895ee0c46f1c49
|
|
||||||
generated: "2025-12-15T21:43:24.262051-06:00"
|
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: ephemera
|
alias: ephemera
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-config
|
|
||||||
version: 0.3.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/ephemera.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/ephemera.png
|
||||||
appVersion: 1.3.1
|
appVersion: 1.3.1
|
||||||
|
|||||||
@@ -42,3 +42,60 @@ spec:
|
|||||||
key: /cl01tl/ephemera/config
|
key: /cl01tl/ephemera/config
|
||||||
metadataPolicy: None
|
metadataPolicy: None
|
||||||
property: ntfy-url
|
property: ntfy-url
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: ephemera-config-backup-secret
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: ephemera-config-backup-secret
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/ephemera/ephemera-config"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: S3_BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_DEFAULT_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: access_key
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: secret_key
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
apiVersion: volsync.backube/v1alpha1
|
apiVersion: volsync.backube/v1alpha1
|
||||||
kind: ReplicationSource
|
kind: ReplicationSource
|
||||||
metadata:
|
metadata:
|
||||||
name: seerr-config-backup-source
|
name: ephemera-config-backup-source
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: seerr-config-backup-source
|
app.kubernetes.io/name: ephemera-config-backup-source
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
sourcePVC: seerr-seerr-chart-config
|
sourcePVC: ephemera-config
|
||||||
trigger:
|
trigger:
|
||||||
schedule: 0 4 * * *
|
schedule: 0 4 * * *
|
||||||
restic:
|
restic:
|
||||||
pruneIntervalDays: 7
|
pruneIntervalDays: 7
|
||||||
repository: seerr-config-backup-secret
|
repository: ephemera-config-backup-secret
|
||||||
retain:
|
retain:
|
||||||
hourly: 1
|
hourly: 1
|
||||||
daily: 3
|
daily: 3
|
||||||
@@ -34,7 +34,7 @@ ephemera:
|
|||||||
flaresolverr:
|
flaresolverr:
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/flaresolverr/flaresolverr
|
repository: ghcr.io/flaresolverr/flaresolverr
|
||||||
tag: v3.4.6
|
tag: v3.4.5
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: LOG_LEVEL
|
- name: LOG_LEVEL
|
||||||
@@ -52,7 +52,7 @@ ephemera:
|
|||||||
apprise-api:
|
apprise-api:
|
||||||
image:
|
image:
|
||||||
repository: caronc/apprise
|
repository: caronc/apprise
|
||||||
tag: 1.3.0
|
tag: 1.2.6
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
@@ -82,7 +82,6 @@ ephemera:
|
|||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
forceRename: ephemera
|
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 5Gi
|
size: 5Gi
|
||||||
@@ -106,5 +105,3 @@ ephemera:
|
|||||||
main:
|
main:
|
||||||
- path: /app/ingest
|
- path: /app/ingest
|
||||||
readOnly: false
|
readOnly: false
|
||||||
volsync-target-config:
|
|
||||||
pvcTarget: ephemera
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: eraser
|
- name: eraser
|
||||||
repository: https://eraser-dev.github.io/eraser/charts
|
repository: https://eraser-dev.github.io/eraser/charts
|
||||||
version: 1.4.1
|
version: 1.3.1
|
||||||
digest: sha256:da828de684b0cd82e99994586f3db4f55c43c01607c4d8d0e70e204c7bbbbf5b
|
digest: sha256:17b561a00acc809810dccd226e7b6d757db39b34a6095dee879da761098125f9
|
||||||
generated: "2025-12-03T22:53:20.200917773Z"
|
generated: "2025-12-01T20:25:36.491841-06:00"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ maintainers:
|
|||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: eraser
|
- name: eraser
|
||||||
version: 1.4.1
|
version: v1.3.1
|
||||||
repository: https://eraser-dev.github.io/eraser/charts
|
repository: https://eraser-dev.github.io/eraser/charts
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
||||||
appVersion: v1.4.1
|
appVersion: v1.3.1
|
||||||
|
|||||||
@@ -19,4 +19,4 @@ dependencies:
|
|||||||
version: 1.19.0
|
version: 1.19.0
|
||||||
repository: https://kubernetes-sigs.github.io/external-dns/
|
repository: https://kubernetes-sigs.github.io/external-dns/
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
||||||
appVersion: v0.20.0
|
appVersion: 1.16.1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: external-secrets
|
- name: external-secrets
|
||||||
repository: https://charts.external-secrets.io
|
repository: https://charts.external-secrets.io
|
||||||
version: 1.1.1
|
version: 1.1.0
|
||||||
digest: sha256:d346563864c95c4ca3fe5f04f6b292e417069d171f5866b5af0fe84277481493
|
digest: sha256:543c98c4f4014f91b05c823444d87990dcdcd9710a0e5ccd953c5dc4e70006ee
|
||||||
generated: "2025-12-06T18:01:23.564488208Z"
|
generated: "2025-12-01T20:25:40.642486-06:00"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ sources:
|
|||||||
- https://github.com/external-secrets/external-secrets/tree/main/deploy/charts/external-secrets
|
- https://github.com/external-secrets/external-secrets/tree/main/deploy/charts/external-secrets
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: external-secrets
|
- name: external-secrets
|
||||||
version: 1.1.1
|
version: 1.1.0
|
||||||
repository: https://charts.external-secrets.io
|
repository: https://charts.external-secrets.io
|
||||||
icon: https://avatars.githubusercontent.com/u/68335991?s=48&v=4
|
icon: https://avatars.githubusercontent.com/u/68335991?s=48&v=4
|
||||||
appVersion: v1.1.1
|
appVersion: 0.17.0
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: app-template
|
- name: app-template
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 7.1.3
|
version: 6.16.0
|
||||||
- name: volsync-target
|
digest: sha256:1c1355c247383bb5aef029eaadaf0c6bbcc23c0e42868178c1ea9a9ab21cc704
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
generated: "2025-11-30T21:05:34.030606-06:00"
|
||||||
version: 0.5.0
|
|
||||||
digest: sha256:5900e87dbe27e52b72edc6dd34e36aeb89c491ac8729b3be499cbd6e09ce88ff
|
|
||||||
generated: "2025-12-17T16:09:27.525526677Z"
|
|
||||||
|
|||||||
@@ -20,18 +20,14 @@ dependencies:
|
|||||||
- name: app-template
|
- name: app-template
|
||||||
alias: freshrss
|
alias: freshrss
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.4.0
|
||||||
- name: cloudflared
|
- name: cloudflared
|
||||||
alias: cloudflared
|
alias: cloudflared
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 1.23.2
|
version: 1.23.0
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
alias: postgres-18-cluster
|
alias: postgres-17-cluster
|
||||||
version: 7.1.3
|
version: 6.16.0
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
|
||||||
- name: volsync-target
|
|
||||||
alias: volsync-target-data
|
|
||||||
version: 0.5.0
|
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/freshrss.png
|
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/freshrss.png
|
||||||
appVersion: 1.27.1
|
appVersion: 1.26.2
|
||||||
|
|||||||
@@ -98,10 +98,67 @@ spec:
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: freshrss-postgresql-18-cluster-backup-secret
|
name: freshrss-data-backup-secret
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: freshrss-postgresql-18-cluster-backup-secret
|
app.kubernetes.io/name: freshrss-data-backup-secret
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: vault
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
mergePolicy: Merge
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/freshrss/freshrss-data"
|
||||||
|
data:
|
||||||
|
- secretKey: BUCKET_ENDPOINT
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: S3_BUCKET_ENDPOINT
|
||||||
|
- secretKey: RESTIC_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: RESTIC_PASSWORD
|
||||||
|
- secretKey: AWS_DEFAULT_REGION
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /cl01tl/volsync/restic/config
|
||||||
|
metadataPolicy: None
|
||||||
|
property: AWS_DEFAULT_REGION
|
||||||
|
- secretKey: AWS_ACCESS_KEY_ID
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: access_key
|
||||||
|
- secretKey: AWS_SECRET_ACCESS_KEY
|
||||||
|
remoteRef:
|
||||||
|
conversionStrategy: Default
|
||||||
|
decodingStrategy: None
|
||||||
|
key: /digital-ocean/home-infra/volsync-backups
|
||||||
|
metadataPolicy: None
|
||||||
|
property: secret_key
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: freshrss-postgresql-17-cluster-backup-secret
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: freshrss-postgresql-17-cluster-backup-secret
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
@@ -128,10 +185,10 @@ spec:
|
|||||||
apiVersion: external-secrets.io/v1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: freshrss-postgresql-18-cluster-backup-secret-garage
|
name: freshrss-postgresql-17-cluster-backup-secret-garage
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: freshrss-postgresql-18-cluster-backup-secret-garage
|
app.kubernetes.io/name: freshrss-postgresql-17-cluster-backup-secret-garage
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: volsync.backube/v1alpha1
|
||||||
|
kind: ReplicationSource
|
||||||
|
metadata:
|
||||||
|
name: freshrss-data-backup-source
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: freshrss-data-backup-source
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
sourcePVC: freshrss-data
|
||||||
|
trigger:
|
||||||
|
schedule: 0 4 * * *
|
||||||
|
restic:
|
||||||
|
pruneIntervalDays: 7
|
||||||
|
repository: freshrss-data-backup-secret
|
||||||
|
retain:
|
||||||
|
hourly: 1
|
||||||
|
daily: 3
|
||||||
|
weekly: 2
|
||||||
|
monthly: 2
|
||||||
|
yearly: 4
|
||||||
|
moverSecurityContext:
|
||||||
|
runAsUser: 568
|
||||||
|
runAsGroup: 568
|
||||||
|
fsGroup: 568
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
|
supplementalGroups:
|
||||||
|
- 44
|
||||||
|
- 100
|
||||||
|
- 109
|
||||||
|
- 65539
|
||||||
|
copyMethod: Snapshot
|
||||||
|
storageClassName: ceph-block
|
||||||
|
volumeSnapshotClassName: ceph-blockpool-snapshot
|
||||||
@@ -11,7 +11,7 @@ freshrss:
|
|||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
image:
|
image:
|
||||||
repository: alpine
|
repository: alpine
|
||||||
tag: 3.23.0
|
tag: 3.22.2
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
@@ -35,7 +35,7 @@ freshrss:
|
|||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
image:
|
image:
|
||||||
repository: alpine
|
repository: alpine
|
||||||
tag: 3.23.0
|
tag: 3.22.2
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
@@ -59,7 +59,7 @@ freshrss:
|
|||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
image:
|
image:
|
||||||
repository: alpine
|
repository: alpine
|
||||||
tag: 3.23.0
|
tag: 3.22.2
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
@@ -98,22 +98,22 @@ freshrss:
|
|||||||
- name: DB_HOST
|
- name: DB_HOST
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: freshrss-postgresql-18-cluster-app
|
name: freshrss-postgresql-17-cluster-app
|
||||||
key: host
|
key: host
|
||||||
- name: DB_BASE
|
- name: DB_BASE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: freshrss-postgresql-18-cluster-app
|
name: freshrss-postgresql-17-cluster-app
|
||||||
key: dbname
|
key: dbname
|
||||||
- name: DB_USER
|
- name: DB_USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: freshrss-postgresql-18-cluster-app
|
name: freshrss-postgresql-17-cluster-app
|
||||||
key: user
|
key: user
|
||||||
- name: DB_PASSWORD
|
- name: DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: freshrss-postgresql-18-cluster-app
|
name: freshrss-postgresql-17-cluster-app
|
||||||
key: password
|
key: password
|
||||||
- name: FRESHRSS_INSTALL
|
- name: FRESHRSS_INSTALL
|
||||||
value: |
|
value: |
|
||||||
@@ -163,7 +163,6 @@ freshrss:
|
|||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
persistence:
|
persistence:
|
||||||
data:
|
data:
|
||||||
forceRename: freshrss-data
|
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 5Gi
|
size: 5Gi
|
||||||
@@ -194,69 +193,59 @@ freshrss:
|
|||||||
readOnly: false
|
readOnly: false
|
||||||
cloudflared:
|
cloudflared:
|
||||||
existingSecretName: freshrss-cloudflared-secret
|
existingSecretName: freshrss-cloudflared-secret
|
||||||
postgres-18-cluster:
|
postgres-17-cluster:
|
||||||
mode: recovery
|
mode: recovery
|
||||||
cluster:
|
cluster:
|
||||||
storage:
|
storage:
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
walStorage:
|
walStorage:
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
|
monitoring:
|
||||||
|
enabled: true
|
||||||
|
prometheusRule:
|
||||||
|
enabled: true
|
||||||
recovery:
|
recovery:
|
||||||
method: objectStore
|
method: objectStore
|
||||||
objectStore:
|
objectStore:
|
||||||
destinationPath: s3://postgres-backups/cl01tl/freshrss/freshrss-postgresql-18-cluster
|
destinationPath: s3://postgres-backups/cl01tl/freshrss/freshrss-postgresql-17-cluster
|
||||||
endpointURL: http://garage-main.garage:3900
|
endpointURL: http://garage-main.garage:3900
|
||||||
index: 1
|
index: 1
|
||||||
endpointCredentials: freshrss-postgresql-18-cluster-backup-secret-garage
|
endpointCredentials: freshrss-postgresql-17-cluster-backup-secret-garage
|
||||||
backup:
|
backup:
|
||||||
objectStore:
|
objectStore:
|
||||||
|
- name: external
|
||||||
|
destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/freshrss/freshrss-postgresql-17-cluster
|
||||||
|
index: 1
|
||||||
|
retentionPolicy: "30d"
|
||||||
|
isWALArchiver: false
|
||||||
- name: garage-local
|
- name: garage-local
|
||||||
destinationPath: s3://postgres-backups/cl01tl/freshrss/freshrss-postgresql-18-cluster
|
destinationPath: s3://postgres-backups/cl01tl/freshrss/freshrss-postgresql-17-cluster
|
||||||
index: 1
|
index: 1
|
||||||
endpointURL: http://garage-main.garage:3900
|
endpointURL: http://garage-main.garage:3900
|
||||||
endpointCredentials: freshrss-postgresql-18-cluster-backup-secret-garage
|
endpointCredentials: freshrss-postgresql-17-cluster-backup-secret-garage
|
||||||
endpointCredentialsIncludeRegion: true
|
endpointCredentialsIncludeRegion: true
|
||||||
retentionPolicy: "3d"
|
retentionPolicy: "3d"
|
||||||
isWALArchiver: true
|
isWALArchiver: true
|
||||||
# - name: external
|
|
||||||
# destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/freshrss/freshrss-postgresql-18-cluster
|
|
||||||
# index: 1
|
|
||||||
# retentionPolicy: "30d"
|
|
||||||
# isWALArchiver: false
|
|
||||||
# - name: garage-remote
|
# - name: garage-remote
|
||||||
# destinationPath: s3://postgres-backups/cl01tl/freshrss/freshrss-postgresql-18-cluster
|
# destinationPath: s3://postgres-backups/cl01tl/freshrss/freshrss-postgresql-17-cluster
|
||||||
# index: 1
|
# index: 1
|
||||||
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
# endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900
|
||||||
# endpointCredentials: freshrss-postgresql-18-cluster-backup-secret-garage
|
# endpointCredentials: freshrss-postgresql-17-cluster-backup-secret-garage
|
||||||
# retentionPolicy: "30d"
|
# retentionPolicy: "30d"
|
||||||
# data:
|
# data:
|
||||||
# compression: bzip2
|
# compression: bzip2
|
||||||
# jobs: 2
|
# jobs: 2
|
||||||
scheduledBackups:
|
scheduledBackups:
|
||||||
|
- name: daily-backup
|
||||||
|
suspend: false
|
||||||
|
schedule: "0 0 0 * * *"
|
||||||
|
backupName: external
|
||||||
- name: live-backup
|
- name: live-backup
|
||||||
suspend: false
|
suspend: false
|
||||||
immediate: true
|
immediate: true
|
||||||
schedule: "0 0 0 * * *"
|
schedule: "0 0 0 * * *"
|
||||||
backupName: garage-local
|
backupName: garage-local
|
||||||
# - name: daily-backup
|
|
||||||
# suspend: false
|
|
||||||
# immediate: true
|
|
||||||
# schedule: "0 0 0 * * *"
|
|
||||||
# backupName: external
|
|
||||||
# - name: weekly-backup
|
# - name: weekly-backup
|
||||||
# suspend: true
|
# suspend: false
|
||||||
# immediate: true
|
# schedule: "0 2 4 * * SAT"
|
||||||
# schedule: "0 0 4 * * SAT"
|
|
||||||
# backupName: garage-remote
|
# backupName: garage-remote
|
||||||
volsync-target-data:
|
|
||||||
pvcTarget: freshrss-data
|
|
||||||
moverSecurityContext:
|
|
||||||
runAsUser: 568
|
|
||||||
runAsGroup: 568
|
|
||||||
fsGroup: 568
|
|
||||||
fsGroupChangePolicy: OnRootMismatch
|
|
||||||
supplementalGroups:
|
|
||||||
- 44
|
|
||||||
- 100
|
|
||||||
- 109
|
|
||||||
- 65539
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user