Compare commits
1 Commits
main
...
da648c9482
| Author | SHA1 | Date | |
|---|---|---|---|
|
da648c9482
|
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,128 +0,0 @@
|
||||
name: lint-test-docker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'hosts/**'
|
||||
- '!clusters/**'
|
||||
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'hosts/**'
|
||||
- '!clusters/**'
|
||||
|
||||
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: |
|
||||
echo ">> Branch ${{ gitea.base_ref }} exists, will continue with linting"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "exists=true" >> $GITEA_OUTPUT
|
||||
|
||||
- name: Set up Node.js
|
||||
if: steps.check-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 | grep -E "hosts/[^/]+/[^/]+")
|
||||
else
|
||||
echo ""
|
||||
echo ">> Checking for changes from a push ..."
|
||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep -E "hosts/[^/]+/[^/]+")
|
||||
fi
|
||||
|
||||
if [ -n "${GIT_DIFF}" ]; then
|
||||
echo ""
|
||||
echo ">> Changes detected:"
|
||||
echo "$GIT_DIFF"
|
||||
|
||||
for path in $GIT_DIFF; do
|
||||
CHANGED_COMPOSE+=$(echo "$path")
|
||||
CHANGED_COMPOSE+=$(echo " ")
|
||||
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 "changes-detected=false" >> $GITEA_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Lint Docker Compose
|
||||
if: steps.check-branch-exists.outputs.exists == '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,168 +0,0 @@
|
||||
name: lint-test-helm
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'clusters/cl01tl/helm/**'
|
||||
- '!hosts/**'
|
||||
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'clusters/cl01tl/helm/**'
|
||||
- '!hosts/**'
|
||||
|
||||
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: |
|
||||
echo ">> Branch ${{ gitea.base_ref }} exists, will continue with linting"
|
||||
|
||||
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 --name-only "${BASE_BRANCH}" | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+"
|
||||
GIT_DIFF=$(git diff --name-only "${BASE_BRANCH}" | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
||||
else
|
||||
echo ""
|
||||
echo ">> Checking for changes from a push ..."
|
||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
||||
fi
|
||||
|
||||
if [ -n "${GIT_DIFF}" ]; then
|
||||
echo ""
|
||||
echo ">> Changes detected:"
|
||||
echo "$GIT_DIFF"
|
||||
|
||||
for path in $GIT_DIFF; do
|
||||
CHANGED_CHARTS+=$(echo "$path" | awk -F '/' '{print $4}')
|
||||
RENDER_DIR+=$(echo " ")
|
||||
done
|
||||
|
||||
else
|
||||
echo ""
|
||||
echo ">> No changes detected"
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "${CHANGED_CHARTS}" ]; then
|
||||
echo ""
|
||||
echo ">> Chart to Lint:"
|
||||
echo "$(echo "${CHANGED_CHARTS}" | sort -u)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
echo "chart-dir<<EOF" >> $GITEA_OUTPUT
|
||||
echo "$(echo "${CHANGED_CHARTS}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "EOF" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Add Repositories
|
||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||
env:
|
||||
CHANGED_CHARTS: ${{ steps.check-dir-changes.outputs.chart-dir }}
|
||||
run: |
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
for dir in ${CHANGED_CHARTS}; do
|
||||
helm dependency list --max-col-width 120 clusters/${CLUSTER}/helm/$dir 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
done
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ""
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Lint Helm Chart
|
||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||
env:
|
||||
CHANGED_CHARTS: ${{ steps.check-dir-changes.outputs.chart-dir }}
|
||||
run: |
|
||||
echo ">> Running linting on changed charts ..."
|
||||
|
||||
for dir in ${CHANGED_CHARTS}; do
|
||||
chart_path=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,418 +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 echo "$cmd" | sh; 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 ">> 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"'
|
||||
|
||||
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,403 +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 echo "$cmd" | sh; 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 ">> 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"'
|
||||
|
||||
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,401 +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 echo "$cmd" | sh; 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 ">> 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"'
|
||||
|
||||
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:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'clusters/cl01tl/helm/**'
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
@@ -12,7 +18,7 @@ env:
|
||||
MANIFEST_DIR: /workspace/alexlebens/infrastructure/infrastructure-manifests
|
||||
|
||||
jobs:
|
||||
render-manifests-dispatch:
|
||||
render-manifests:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout Main
|
||||
@@ -53,7 +59,7 @@ jobs:
|
||||
git checkout -b $BRANCH_NAME
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
echo "-----"
|
||||
|
||||
- name: Check which Directories have Changes
|
||||
id: check-dir-changes
|
||||
@@ -62,23 +68,35 @@ jobs:
|
||||
|
||||
RENDER_DIR=()
|
||||
|
||||
echo ">> Triggered on dispatch, will check all paths ..."
|
||||
RENDER_DIR+=$(ls clusters/cl01tl/helm/)
|
||||
if [ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]; then
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||
env:
|
||||
@@ -94,12 +112,7 @@ jobs:
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
done
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
echo "-----"
|
||||
|
||||
- name: Remove Changed Manifest Files
|
||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||
@@ -113,11 +126,11 @@ jobs:
|
||||
for dir in ${RENDER_DIR}; do
|
||||
chart_path=${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$dir
|
||||
|
||||
echo "$chart_path"
|
||||
echo ">> Removing from $chart_path ..."
|
||||
rm -rf $chart_path/*
|
||||
done
|
||||
|
||||
echo "----"
|
||||
echo "-----"
|
||||
|
||||
- name: Render Helm Manifests
|
||||
id: render-manifests
|
||||
@@ -133,22 +146,18 @@ jobs:
|
||||
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
|
||||
OUTPUT_FILE="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/$chart_name.yaml"
|
||||
|
||||
cd $chart_path
|
||||
|
||||
echo ""
|
||||
echo ">> Building helm dependency ..."
|
||||
helm dependency build --skip-refresh
|
||||
helm dependency build
|
||||
|
||||
echo ""
|
||||
echo ">> Linting helm ..."
|
||||
@@ -156,31 +165,10 @@ jobs:
|
||||
|
||||
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
|
||||
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds > "$OUTPUT_FILE"
|
||||
|
||||
echo ""
|
||||
echo ">> Formating rendered template ..."
|
||||
echo "$TEMPLATE" | yq '... comments=""' | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||
|
||||
echo ""
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||
ls $OUTPUT_FOLDER
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FILE"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
@@ -189,7 +177,7 @@ jobs:
|
||||
fi
|
||||
done
|
||||
|
||||
echo "----"
|
||||
echo "-----"
|
||||
|
||||
- name: Check for Changes
|
||||
id: check-changes
|
||||
@@ -197,19 +185,16 @@ jobs:
|
||||
run: |
|
||||
cd ${MANIFEST_DIR}
|
||||
|
||||
GIT_CHANGES=$(git status --porcelain)
|
||||
|
||||
if [ -n "$GIT_CHANGES" ]; then
|
||||
if git status --porcelain | grep -q .; then
|
||||
echo ">> Changes detected"
|
||||
git status --porcelain
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
|
||||
else
|
||||
echo ">> No changes detected, skipping PR creation"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
echo "-----"
|
||||
|
||||
- name: Commit and Push Changes
|
||||
id: commit-push
|
||||
@@ -221,11 +206,11 @@ jobs:
|
||||
git add .
|
||||
git commit -m "chore: Update manifests after change"
|
||||
|
||||
REPO_URL="${{ secrets.REPO_URL }}/${{ gitea.repository }}"
|
||||
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}
|
||||
|
||||
echo "----"
|
||||
echo "-----"
|
||||
|
||||
echo "HEAD_BRANCH=${BRANCH_NAME}" >> $GITEA_OUTPUT
|
||||
echo "push=true" >> $GITEA_OUTPUT
|
||||
@@ -267,13 +252,13 @@ jobs:
|
||||
cat response_errors.txt
|
||||
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"
|
||||
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-index=true" >> $GITEA_OUTPUT
|
||||
|
||||
elif [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .[0].state)" == "closed" ]; then
|
||||
if [ "$HTTP_STATUS" == "200" ] && [ "$(cat response_body.json | jq -r .state)" == "closed" ]; then
|
||||
echo ">> Pull Request found, but was closed"
|
||||
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
||||
|
||||
@@ -282,7 +267,7 @@ jobs:
|
||||
echo "pull-request-exists=false" >> $GITEA_OUTPUT
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
echo "-----"
|
||||
|
||||
- name: Create Pull Request
|
||||
id: create-pull-request
|
||||
@@ -302,7 +287,7 @@ jobs:
|
||||
--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}' )
|
||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body'} )
|
||||
|
||||
echo ">> Creating PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
||||
echo ">> With Endpoint of:"
|
||||
@@ -336,8 +321,6 @@ jobs:
|
||||
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
|
||||
@@ -351,7 +334,17 @@ jobs:
|
||||
exit 1
|
||||
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
|
||||
uses: niniyas/ntfy-action@master
|
||||
@@ -363,7 +356,7 @@ jobs:
|
||||
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 }}!"
|
||||
details: "Manifest rendering for Infrastructure has created a new Pull Request!"
|
||||
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}]'
|
||||
|
||||
@@ -15,7 +15,7 @@ maintainers:
|
||||
- name: alexlebens
|
||||
dependencies:
|
||||
- name: argo-cd
|
||||
version: 9.1.6
|
||||
version: 9.1.5
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/argo-cd.png
|
||||
appVersion: 3.0.0
|
||||
@@ -60,7 +60,7 @@ argo-cd:
|
||||
enabled: true
|
||||
auth: false
|
||||
redisSecretInit:
|
||||
enabled: false
|
||||
enabled: true
|
||||
server:
|
||||
replicas: 2
|
||||
extensions:
|
||||
@@ -279,7 +279,7 @@ argo-cd:
|
||||
- description: Application has degraded
|
||||
send:
|
||||
- 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: |
|
||||
- description: Application syncing has failed
|
||||
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,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:926b8da839684072fd79954aff0c9852c2ff3b618b0fa35177bdec8e2dff4986
|
||||
generated: "2025-12-05T17:02:01.15162583Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:b5d823171e1b4dc1d3856f782f0c67cbb5d49e4fa170df2f21b06303c7aff7f5
|
||||
generated: "2025-11-30T21:05:19.732832-06:00"
|
||||
|
||||
@@ -16,6 +16,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: actual
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/actual-budget.png
|
||||
appVersion: 25.11.0
|
||||
|
||||
@@ -9,7 +9,7 @@ actual:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/actualbudget/actual
|
||||
tag: 25.12.0
|
||||
tag: 25.11.0
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
dependencies:
|
||||
- name: argo-workflows
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
version: 0.46.1
|
||||
version: 0.45.28
|
||||
- name: argo-events
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
version: 2.4.19
|
||||
version: 2.4.17
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:1f98e04526d7b61fa9ee690c46542bcc2ae6b69bf7619e1107a1592386de9bf2
|
||||
generated: "2025-12-07T03:02:14.909953853Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:b00fd479a9d9e606661b3799182c8e24395b4f531f8d2bda87bdc5db16a8d66c
|
||||
generated: "2025-12-01T19:55:40.18149-06:00"
|
||||
|
||||
@@ -18,14 +18,14 @@ maintainers:
|
||||
- name: alexlebens
|
||||
dependencies:
|
||||
- name: argo-workflows
|
||||
version: 0.46.1
|
||||
version: 0.45.28
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
- name: argo-events
|
||||
version: 2.4.19
|
||||
version: 2.4.17
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/argo-cd.png
|
||||
appVersion: v3.6.7
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
dependencies:
|
||||
- name: argo-cd
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
version: 9.1.6
|
||||
digest: sha256:488b8e826e7cc7179f154c1b7555e2cec78b69becb9f8cdbe4937b3546d87e5d
|
||||
generated: "2025-12-05T04:02:40.060511766Z"
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:977ed15091e9ed30d647a626214701d22f3a8a5232a900e33f753cc7e090042f
|
||||
generated: "2025-12-05T17:02:13.674405673Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:f3a9990542f24965fadad0b5493059b78cdc3fae91c8214577fa6f41ca5f7de3
|
||||
generated: "2025-11-30T21:05:21.317114-06:00"
|
||||
|
||||
@@ -18,6 +18,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: audiobookshelf
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/audiobookshelf.png
|
||||
appVersion: 2.21.0
|
||||
|
||||
@@ -9,7 +9,7 @@ audiobookshelf:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/advplyr/audiobookshelf
|
||||
tag: 2.31.0
|
||||
tag: 2.30.0
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
|
||||
@@ -4,9 +4,9 @@ dependencies:
|
||||
version: 2025.10.2
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:e6ea05d8bdb96164bc19da117078b5101f329ad5f1b461fa02f198bef45454f3
|
||||
generated: "2025-12-07T02:54:01.695741198Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:ad51c94c1125890ef60d179205d14c55eb9fdbc2702e3455e233042a48d00146
|
||||
generated: "2025-12-01T20:25:07.016724-06:00"
|
||||
|
||||
@@ -26,10 +26,10 @@ dependencies:
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/authentik.png
|
||||
appVersion: 2025.4.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:6e6f20320a485b57288a6febae1b7623076059c370f88b7fbe92460fc4047db3
|
||||
generated: "2025-12-05T17:02:26.599646463Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:aa797b99d6d8b7aafe142811938408b7f234df6d429a7e076196337cc63876cb
|
||||
generated: "2025-12-01T20:25:09.888407-06:00"
|
||||
|
||||
@@ -16,6 +16,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: backrest
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/backrest.png
|
||||
appVersion: v1.10.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:54c88d51b4067dec5b22623957970b64092bf3f417fabb58277f6bc3e01eca20
|
||||
generated: "2025-12-05T17:02:40.843820962Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:c6f6d1f2fb9fedf54094920737a6f0bd1a2ab89f0a4122966ca98f6c9d3f11fa
|
||||
generated: "2025-11-30T21:05:22.694344-06:00"
|
||||
|
||||
@@ -18,6 +18,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: bazarr
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/bazarr.png
|
||||
appVersion: 1.5.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:b8516161886b87344848ad2b3bdafbd66da61ca8ffc5e9a5ebed462f205c9912
|
||||
generated: "2025-12-05T17:02:59.562863413Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:0009729bcf7f1941401b767fd4ae952b7a8d44f80053090b4a9224de912a14ef
|
||||
generated: "2025-12-01T20:25:13.511406-06:00"
|
||||
|
||||
@@ -16,6 +16,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: blocky
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/blocky.png
|
||||
appVersion: v0.25
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: mariadb-cluster
|
||||
repository: https://helm.mariadb.com/mariadb-operator
|
||||
version: 25.10.2
|
||||
digest: sha256:58d978bd46c61285b06acc6d9a40404d8059f2df7b953dea13c528b35350d0a8
|
||||
generated: "2025-12-05T17:03:15.7199669Z"
|
||||
digest: sha256:264725306c1d1f38140293c0820abdc7e8aa4f39764b4d91e20200705ce2ec91
|
||||
generated: "2025-11-30T21:05:24.649316-06:00"
|
||||
|
||||
@@ -16,7 +16,7 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: booklore
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: mariadb-cluster
|
||||
version: 25.10.2
|
||||
repository: https://helm.mariadb.com/mariadb-operator
|
||||
|
||||
@@ -9,7 +9,7 @@ booklore:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/booklore-app/booklore
|
||||
tag: v1.13.2
|
||||
tag: v1.12.0
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
|
||||
@@ -75,7 +75,6 @@ cilium:
|
||||
prometheus:
|
||||
enabled: true
|
||||
serviceMonitor:
|
||||
trustCRDsExist: true
|
||||
enabled: true
|
||||
envoy:
|
||||
enabled: true
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
digest: sha256:3cf78630cd7670e1157a87fc7ccbeca248ef4ced8a3170e69140ea3e1b0ff564
|
||||
generated: "2025-12-07T02:54:11.675097664Z"
|
||||
version: 1.23.0
|
||||
digest: sha256:99eb4f940077dc916f5425d196232fcd363223fa7b7b5d3889f5965aa59e26f5
|
||||
generated: "2025-11-30T21:05:26.699161-06:00"
|
||||
|
||||
@@ -19,10 +19,10 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: code-server
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/visual-studio-code.png
|
||||
appVersion: 4.100.2
|
||||
|
||||
@@ -9,7 +9,7 @@ code-server:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/linuxserver/code-server
|
||||
tag: 4.106.3@sha256:aab9520fe923b2d93dccc2c806f3dc60649c2f4a2847fcd40c942227d0f1ae8f
|
||||
tag: 4.106.2@sha256:a98afdbcb59559f11e5e8df284062e55da1076b2e470e13db4aae133ea82bad0
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
|
||||
@@ -39,27 +39,16 @@ descheduler:
|
||||
- name: RemovePodsViolatingNodeTaints
|
||||
- name: RemovePodsViolatingInterPodAntiAffinity
|
||||
- name: RemovePodsViolatingTopologySpreadConstraint
|
||||
- name: "HighNodeUtilization"
|
||||
args:
|
||||
thresholds:
|
||||
cpu : 80
|
||||
memory: 80
|
||||
pods: 90
|
||||
evictableNamespaces:
|
||||
exclude:
|
||||
- "kube-system"
|
||||
evictionModes:
|
||||
- "OnlyThresholdingResources"
|
||||
- name: LowNodeUtilization
|
||||
args:
|
||||
thresholds:
|
||||
cpu: 30
|
||||
memory: 30
|
||||
pods: 50
|
||||
cpu: 20
|
||||
memory: 20
|
||||
pods: 20
|
||||
targetThresholds:
|
||||
cpu: 60
|
||||
memory: 40
|
||||
pods: 80
|
||||
memory: 60
|
||||
pods: 60
|
||||
plugins:
|
||||
balance:
|
||||
enabled:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:73ab37385c3d0ec2db83a3640bc03b08ddd06fd015e1b7138e49bc8c3be9382e
|
||||
generated: "2025-12-07T02:54:20.639142398Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:2f3d9f7a8d8d71b19ff3292993647d22a89aa6c444a6f0819b82cd0a577f1ebc
|
||||
generated: "2025-11-30T21:05:28.43692-06:00"
|
||||
|
||||
@@ -20,14 +20,14 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: directus
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: cloudflared
|
||||
alias: cloudflared-directus
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/directus.png
|
||||
appVersion: 11.7.2
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: element-web
|
||||
repository: https://ananace.gitlab.io/charts
|
||||
version: 1.4.26
|
||||
version: 1.4.24
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
digest: sha256:f9196cbede894c6da6ecedd9ae05d3f1fd0e20304eca8ca38c18334a923b2235
|
||||
generated: "2025-12-07T02:54:29.895481505Z"
|
||||
version: 1.23.0
|
||||
digest: sha256:05aa032adca6d808215d6dcd5d7e38b821a740a53868238f79adaa606444b3ae
|
||||
generated: "2025-11-30T21:05:30.356497-06:00"
|
||||
|
||||
@@ -17,11 +17,11 @@ maintainers:
|
||||
- name: alexlebens
|
||||
dependencies:
|
||||
- name: element-web
|
||||
version: 1.4.26
|
||||
version: 1.4.24
|
||||
repository: https://ananace.gitlab.io/charts
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
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
|
||||
appVersion: v1.11.100
|
||||
|
||||
@@ -2,7 +2,7 @@ element-web:
|
||||
replicaCount: 1
|
||||
image:
|
||||
repository: vectorim/element-web
|
||||
tag: v1.12.6
|
||||
tag: v1.12.4
|
||||
pullPolicy: IfNotPresent
|
||||
defaultServer:
|
||||
url: https://matrix.alexlebens.dev
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:b08b2d3923734ba8844754727803a4b4e1de2ad418c3f755ccd64927266c1b5c
|
||||
generated: "2025-12-05T17:04:04.30013278Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:9900009eb6415344d8c5387371a0052259092d92f34c21774f6a6abe9f11f43e
|
||||
generated: "2025-11-30T21:05:32.524168-06:00"
|
||||
|
||||
@@ -18,6 +18,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: ephemera
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/ephemera.png
|
||||
appVersion: 1.3.1
|
||||
|
||||
@@ -34,7 +34,7 @@ ephemera:
|
||||
flaresolverr:
|
||||
image:
|
||||
repository: ghcr.io/flaresolverr/flaresolverr
|
||||
tag: v3.4.6
|
||||
tag: v3.4.5
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: LOG_LEVEL
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: eraser
|
||||
repository: https://eraser-dev.github.io/eraser/charts
|
||||
version: 1.4.1
|
||||
digest: sha256:da828de684b0cd82e99994586f3db4f55c43c01607c4d8d0e70e204c7bbbbf5b
|
||||
generated: "2025-12-03T22:53:20.200917773Z"
|
||||
version: 1.3.1
|
||||
digest: sha256:17b561a00acc809810dccd226e7b6d757db39b34a6095dee879da761098125f9
|
||||
generated: "2025-12-01T20:25:36.491841-06:00"
|
||||
|
||||
@@ -14,7 +14,7 @@ maintainers:
|
||||
- name: alexlebens
|
||||
dependencies:
|
||||
- name: eraser
|
||||
version: 1.4.1
|
||||
version: v1.3.1
|
||||
repository: https://eraser-dev.github.io/eraser/charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
||||
appVersion: v1.3.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: external-secrets
|
||||
repository: https://charts.external-secrets.io
|
||||
version: 1.1.1
|
||||
digest: sha256:d346563864c95c4ca3fe5f04f6b292e417069d171f5866b5af0fe84277481493
|
||||
generated: "2025-12-06T18:01:23.564488208Z"
|
||||
version: 1.1.0
|
||||
digest: sha256:543c98c4f4014f91b05c823444d87990dcdcd9710a0e5ccd953c5dc4e70006ee
|
||||
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
|
||||
dependencies:
|
||||
- name: external-secrets
|
||||
version: 1.1.1
|
||||
version: 1.1.0
|
||||
repository: https://charts.external-secrets.io
|
||||
icon: https://avatars.githubusercontent.com/u/68335991?s=48&v=4
|
||||
appVersion: 0.17.0
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:d4b26fd1608a0c767c6ebb226173cef133ed53f45098851713121e429bc614a1
|
||||
generated: "2025-12-07T02:54:39.594902963Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:1c1355c247383bb5aef029eaadaf0c6bbcc23c0e42868178c1ea9a9ab21cc704
|
||||
generated: "2025-11-30T21:05:34.030606-06:00"
|
||||
|
||||
@@ -20,14 +20,14 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: freshrss
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/freshrss.png
|
||||
appVersion: 1.26.2
|
||||
|
||||
@@ -11,7 +11,7 @@ freshrss:
|
||||
runAsUser: 0
|
||||
image:
|
||||
repository: alpine
|
||||
tag: 3.23.0
|
||||
tag: 3.22.2
|
||||
pullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
@@ -35,7 +35,7 @@ freshrss:
|
||||
runAsUser: 0
|
||||
image:
|
||||
repository: alpine
|
||||
tag: 3.23.0
|
||||
tag: 3.22.2
|
||||
pullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
@@ -59,7 +59,7 @@ freshrss:
|
||||
runAsUser: 0
|
||||
image:
|
||||
repository: alpine
|
||||
tag: 3.23.0
|
||||
tag: 3.22.2
|
||||
pullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:36e920ce6efee3b33b40641652f814c888ae3c50272895ef286fb8236a010924
|
||||
generated: "2025-12-05T17:04:29.153093714Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:7977708d7681e8d5cbc066bcda4241144b0c8b5b590be89a394740df167c90da
|
||||
generated: "2025-12-01T20:25:44.910074-06:00"
|
||||
|
||||
@@ -17,6 +17,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: garage
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
||||
appVersion: v2.1.0
|
||||
|
||||
@@ -4,6 +4,6 @@ dependencies:
|
||||
version: 1.4.4
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:53e3b31b3fa3916ac4478c0ca3733a18f7145a0129b6a9c7aefdaf8169cb525c
|
||||
generated: "2025-12-04T00:00:45.882393108Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:9424c70bc46b5582f19b695196586546c69862ccca8950b906d5532cf03c7792
|
||||
generated: "2025-12-01T19:55:44.159963-06:00"
|
||||
|
||||
@@ -22,7 +22,7 @@ dependencies:
|
||||
version: 1.4.4
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/gatus.png
|
||||
appVersion: v5.12.0
|
||||
|
||||
@@ -140,9 +140,6 @@ gatus:
|
||||
- name: audiobookshelf
|
||||
url: https://audiobookshelf.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: booklore
|
||||
url: https://booklore.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: home-assistant
|
||||
url: https://home-assistant.alexlebens.net
|
||||
<<: *defaults
|
||||
@@ -179,11 +176,6 @@ gatus:
|
||||
- name: n8n
|
||||
url: https://n8n.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: kronic
|
||||
url: https://kronic.alexlebens.net
|
||||
<<: *defaults
|
||||
conditions:
|
||||
- "[STATUS] == 401"
|
||||
- name: omni-tools
|
||||
url: https://omni-tools.alexlebens.net
|
||||
<<: *defaults
|
||||
@@ -253,9 +245,6 @@ gatus:
|
||||
- name: ceph
|
||||
url: https://ceph.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: garage
|
||||
url: https://garage-webui.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: pgadmin
|
||||
url: https://pgadmin.alexlebens.net
|
||||
<<: *defaults
|
||||
@@ -265,29 +254,6 @@ gatus:
|
||||
- name: vault
|
||||
url: https://vault.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: backrest
|
||||
url: https://backrest.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: qui
|
||||
url: https://qui.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: qbittorrent
|
||||
url: https://qbittorrent.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: prowlarr
|
||||
url: https://prowlarr.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: huntarr
|
||||
url: https://huntarr.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: bazarr
|
||||
url: https://bazarr.alexlebens.net
|
||||
<<: *defaults
|
||||
conditions:
|
||||
- "[STATUS] == 401"
|
||||
- name: tdarr
|
||||
url: https://tdarr.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: sonarr
|
||||
url: https://sonarr.alexlebens.net
|
||||
<<: *defaults
|
||||
@@ -318,11 +284,25 @@ gatus:
|
||||
- name: slskd
|
||||
url: https://slskd.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: ephemera
|
||||
url: https://ephemera.alexlebens.net
|
||||
- name: qui
|
||||
url: https://qui.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: listenarr
|
||||
url: https://listenarr.alexlebens.net
|
||||
- name: qbittorrent
|
||||
url: https://qbittorrent.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: prowlarr
|
||||
url: https://prowlarr.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: bazarr
|
||||
url: https://bazarr.alexlebens.net
|
||||
<<: *defaults
|
||||
conditions:
|
||||
- "[STATUS] == 401"
|
||||
- name: huntarr
|
||||
url: https://huntarr.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: tdarr
|
||||
url: https://tdarr.alexlebens.net
|
||||
<<: *defaults
|
||||
- name: www
|
||||
url: https://www.alexlebens.dev
|
||||
@@ -367,14 +347,24 @@ gatus:
|
||||
url: https://codeserver.alexlebens.dev
|
||||
<<: *defaults
|
||||
group: external
|
||||
- name: authentik
|
||||
url: https://auth.alexlebens.dev
|
||||
<<: *defaults
|
||||
group: external
|
||||
- name: public homepage
|
||||
url: https://home.alexlebens.dev
|
||||
<<: *defaults
|
||||
group: external
|
||||
- name: discord
|
||||
group: public
|
||||
url: https://discord.com/app
|
||||
conditions:
|
||||
- "[STATUS] == 200"
|
||||
- "[RESPONSE_TIME] < 400"
|
||||
interval: 10s
|
||||
- name: reddit
|
||||
group: public
|
||||
url: https://reddit.com
|
||||
conditions:
|
||||
- "[STATUS] == 200"
|
||||
- "[RESPONSE_TIME] < 400"
|
||||
interval: 10s
|
||||
postgres-17-cluster:
|
||||
mode: recovery
|
||||
cluster:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: generic-device-plugin
|
||||
repository: https://gitea.alexlebens.dev/api/packages/alexlebens/helm
|
||||
version: 0.20.4
|
||||
digest: sha256:4aa24e57233783f99d3de453f997ff4dddecaea729ab09b78745ee89ffa0e4a8
|
||||
generated: "2025-12-06T01:01:30.343689275Z"
|
||||
version: 0.20.3
|
||||
digest: sha256:70771f4cfa2fa64d06b94cd60f51b1ae36da429232017954d77e675e1df39a56
|
||||
generated: "2025-12-03T00:32:22.249565107Z"
|
||||
|
||||
@@ -15,6 +15,6 @@ maintainers:
|
||||
dependencies:
|
||||
- name: generic-device-plugin
|
||||
repository: https://gitea.alexlebens.dev/api/packages/alexlebens/helm
|
||||
version: 0.20.4
|
||||
version: 0.20.3
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
||||
appVersion: 1.0.0
|
||||
|
||||
@@ -7,15 +7,15 @@ dependencies:
|
||||
version: 0.2.1
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: meilisearch
|
||||
repository: https://meilisearch.github.io/meilisearch-kubernetes
|
||||
version: 0.17.2
|
||||
version: 0.17.1
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:392636c97a9be96f21c70f9b53559398aa15e67a0cae551041ee64f23088b59a
|
||||
generated: "2025-12-07T02:54:49.861996743Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:6e72cd4abc36e238a5129d0ee471bc296435f8ff1c8be7f3132fc33193a39f23
|
||||
generated: "2025-12-01T20:25:50.496342-06:00"
|
||||
|
||||
@@ -34,17 +34,17 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: backup
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: meilisearch
|
||||
version: 0.17.2
|
||||
version: 0.17.1
|
||||
repository: https://meilisearch.github.io/meilisearch-kubernetes
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/gitea.png
|
||||
appVersion: 1.23.7
|
||||
|
||||
@@ -12,6 +12,8 @@ spec:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: gitea
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
matchExpressions:
|
||||
- { key: app.kubernetes.io/controller, operator: NotIn, values: [backup] }
|
||||
endpoints:
|
||||
- port: http
|
||||
|
||||
|
||||
@@ -174,9 +174,6 @@ gitea-actions:
|
||||
backup:
|
||||
global:
|
||||
fullnameOverride: gitea-backup
|
||||
labels:
|
||||
app.kubernetes.io/instance: gitea-backup
|
||||
app.kubernetes.io/name: gitea-backup
|
||||
controllers:
|
||||
backup:
|
||||
type: cronjob
|
||||
@@ -215,7 +212,7 @@ backup:
|
||||
s3-backup:
|
||||
image:
|
||||
repository: d3fk/s3cmd
|
||||
tag: latest@sha256:590c42746db1252be8aad33e287c7910698c32b58b4fc34f67592a5bd0841551
|
||||
tag: latest@sha256:7bdbd33bb3d044884598898b9e9b383385759fbd6ebf52888700bd9b0e0fab91
|
||||
pullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
@@ -239,7 +236,7 @@ backup:
|
||||
s3-prune:
|
||||
image:
|
||||
repository: d3fk/s3cmd
|
||||
tag: latest@sha256:590c42746db1252be8aad33e287c7910698c32b58b4fc34f67592a5bd0841551
|
||||
tag: latest@sha256:7bdbd33bb3d044884598898b9e9b383385759fbd6ebf52888700bd9b0e0fab91
|
||||
pullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
|
||||
@@ -4,6 +4,6 @@ dependencies:
|
||||
version: v5.20.0
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:3bd7096e4401df5818733b3e0b08f281c12af9b54a272fbe3e753b2616d725dd
|
||||
generated: "2025-12-04T00:01:28.278027037Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:d70b284b771af610116564e5f47d72415ab0d3520ecb552159ee8dc8acd2ab46
|
||||
generated: "2025-12-01T19:55:46.485062-06:00"
|
||||
|
||||
@@ -21,7 +21,7 @@ dependencies:
|
||||
repository: https://grafana.github.io/helm-charts
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/grafana.png
|
||||
appVersion: v5.18.0
|
||||
|
||||
@@ -26,9 +26,6 @@ headlamp:
|
||||
- name: trivy
|
||||
source: https://artifacthub.io/packages/headlamp/headlamp-trivy/headlamp_trivy
|
||||
version: 0.3.1
|
||||
- name: external-secrets-operator
|
||||
source: https://artifacthub.io/packages/headlamp/external-secrets-operator-headlamp-plugin/external-secrets-operator
|
||||
version: 0.1.0-beta7
|
||||
installOptions:
|
||||
parallel: false
|
||||
maxConcurrent: 1
|
||||
parallel: true
|
||||
maxConcurrent: 2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:a1961e446ba4361fa5d7ae31260c2ce472f27d0d2de2170cc8303586ef5c33ac
|
||||
generated: "2025-12-05T17:04:59.022729608Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:ae6008e107c25dc25e6f595f783d137273207aeb06a8ece9fbba0d895cc0d729
|
||||
generated: "2025-11-30T21:07:04.566378-06:00"
|
||||
|
||||
@@ -18,6 +18,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: home-assistant
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/home-assistant.png
|
||||
appVersion: 2025.5.2
|
||||
|
||||
@@ -9,7 +9,7 @@ home-assistant:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/home-assistant/home-assistant
|
||||
tag: 2025.12.1
|
||||
tag: 2025.11.3
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
@@ -21,7 +21,7 @@ home-assistant:
|
||||
code-server:
|
||||
image:
|
||||
repository: ghcr.io/linuxserver/code-server
|
||||
tag: 4.106.3@sha256:aab9520fe923b2d93dccc2c806f3dc60649c2f4a2847fcd40c942227d0f1ae8f
|
||||
tag: 4.106.2@sha256:a98afdbcb59559f11e5e8df284062e55da1076b2e470e13db4aae133ea82bad0
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
digest: sha256:fbfdebf734560044cfe5d2c4771b63cbcabc121d13c44b751f914877b5bdc83f
|
||||
generated: "2025-12-07T02:55:01.91141803Z"
|
||||
version: 1.23.0
|
||||
digest: sha256:1bcc384dc2dc0a521600c90b8040f0cac9d706bde76419386d5eb7408e45169a
|
||||
generated: "2025-11-30T21:07:07.275267-06:00"
|
||||
|
||||
@@ -18,10 +18,10 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: homepage
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/homepage.png
|
||||
appVersion: v1.2.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:cbaccff17c1d80c4b9637a321d07f41960e66510edb83258254ebbbda08f82df
|
||||
generated: "2025-12-05T17:05:23.539922773Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:fe69d34709d7f0c3674453013c0e76d6064531134404de8f4e72fb509b98bcb0
|
||||
generated: "2025-11-30T21:07:05.997919-06:00"
|
||||
|
||||
@@ -16,6 +16,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: homepage
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/homepage.png
|
||||
appVersion: v1.2.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:44805f836d7cfcd7511616ad0d93da02b3e6cfdb58d823f6dcf17b17bb47d3a1
|
||||
generated: "2025-12-05T17:05:35.445002111Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:23e60d425ef97edda213f29628f29adca4b82dd68c75f764fd83fd865acd8c70
|
||||
generated: "2025-11-30T21:07:08.851326-06:00"
|
||||
|
||||
@@ -16,6 +16,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: huntarr
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/huntarr.png
|
||||
appVersion: 7.0.0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:fa72554b2aeb7710212e3cbff3f7d080d04ee205c4cee95f27f5e12cdeab78a9
|
||||
generated: "2025-12-05T17:05:47.565602786Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:6c1412459bf39357f20db21735f64dc4f5fe2a0a746d19a78ddff43801610991
|
||||
generated: "2025-11-30T21:07:10.484678-06:00"
|
||||
|
||||
@@ -17,10 +17,10 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: immich
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/immich.png
|
||||
appVersion: v2.0.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:042995f7609eaf4036fa416dcdf60e9c7f3fb90a5614322f4e2f6cce17c236ff
|
||||
generated: "2025-12-05T17:05:59.576358789Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:5394000890e1bcc83f94b138c148c591f6a091850e734acbd6e1e7d053469f38
|
||||
generated: "2025-11-30T21:07:11.924605-06:00"
|
||||
|
||||
@@ -20,6 +20,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: jellyfin
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/jellyfin.png
|
||||
appVersion: 10.10.7
|
||||
|
||||
@@ -9,7 +9,7 @@ jellyfin:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/jellyfin/jellyfin
|
||||
tag: 10.11.4
|
||||
tag: 10.11.3
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:6c8b6a56bcdad0ea3f8e998c28642deaf449a7a37aea8ba9616d88fcc6d2bc14
|
||||
generated: "2025-12-05T17:06:11.6747146Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:4d14b684813eac9fcae1be18bcc5644c8583e2c014da6941705b58b118bbd6ee
|
||||
generated: "2025-11-30T21:07:13.230393-06:00"
|
||||
|
||||
@@ -18,10 +18,10 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: jellystat
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/jellystat.png
|
||||
appVersion: 1.1.6
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: meilisearch
|
||||
repository: https://meilisearch.github.io/meilisearch-kubernetes
|
||||
version: 0.17.2
|
||||
version: 0.17.1
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
digest: sha256:c291962defb9fb8614db91ea3eef795b2bdf82e0364595a27cbd335e7f9a3179
|
||||
generated: "2025-12-07T02:55:11.250839916Z"
|
||||
version: 1.23.0
|
||||
digest: sha256:87a67950901f8a047f790ed21e8fc1cbfd076e05a3a55377b1cb0aa081f10f8d
|
||||
generated: "2025-11-30T21:07:14.824697-06:00"
|
||||
|
||||
@@ -20,13 +20,13 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: karakeep
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: meilisearch
|
||||
version: 0.17.2
|
||||
version: 0.17.1
|
||||
repository: https://meilisearch.github.io/meilisearch-kubernetes
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.2
|
||||
version: 1.23.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/webp/karakeep.webp
|
||||
appVersion: 0.26.0
|
||||
|
||||
@@ -9,7 +9,7 @@ karakeep:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/karakeep-app/karakeep
|
||||
tag: 0.29.1
|
||||
tag: 0.28.0
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: DATA_DIR
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:b44499c1cfa91da49eee310dbcedbe116628620c97666b0cde0f976be5638764
|
||||
generated: "2025-12-05T17:06:40.903530445Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:c49d66e1174d093c845498c6b88409b23f3392a93d00f8e029636a10080fc72d
|
||||
generated: "2025-11-30T21:07:17.110714-06:00"
|
||||
|
||||
@@ -16,6 +16,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: kiwix
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kiwix-dark.png
|
||||
appVersion: 3.7.0
|
||||
|
||||
@@ -9,7 +9,7 @@ kiwix:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/kiwix/kiwix-serve
|
||||
tag: 3.8.1
|
||||
tag: 3.8.0
|
||||
pullPolicy: IfNotPresent
|
||||
args:
|
||||
- '*.zim'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:39fd05347cf1189a1cafbbbed8531de082dc4fa989ec46f0ecab661c307d89ac
|
||||
generated: "2025-12-05T17:06:55.655563589Z"
|
||||
version: 6.16.0
|
||||
digest: sha256:2e3d60887a3f063401c22e5403ed9d55eed07ffb7fbe4bac39eaafc951830f18
|
||||
generated: "2025-12-01T19:55:50.498761-06:00"
|
||||
|
||||
@@ -20,10 +20,10 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: komodo
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
- name: postgres-cluster
|
||||
alias: postgresql-17-fdb-cluster
|
||||
version: 6.16.1
|
||||
version: 6.16.0
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/komodo.png
|
||||
appVersion: v1.17.5
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: kube-prometheus-stack
|
||||
repository: oci://ghcr.io/prometheus-community/charts
|
||||
version: 79.12.0
|
||||
version: 79.7.1
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:e7edbec86ffbb16885333a6e1eeffec5c336bed8c161c52165949987eca4392d
|
||||
generated: "2025-12-05T21:30:48.985834989Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:e046e7599ad195b57a8cf63b373a82d950778ac5dcc661f2ea135d433b46dacc
|
||||
generated: "2025-12-01T19:55:54.093624-06:00"
|
||||
|
||||
@@ -19,11 +19,11 @@ maintainers:
|
||||
- name: alexlebens
|
||||
dependencies:
|
||||
- name: kube-prometheus-stack
|
||||
version: 79.12.0
|
||||
version: 79.7.1
|
||||
repository: oci://ghcr.io/prometheus-community/charts
|
||||
- name: app-template
|
||||
alias: ntfy-alertmanager
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/prometheus.png
|
||||
appVersion: v0.82.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: app-template
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
digest: sha256:e4b65e3b2aa2c8906e1cbcf9ce6ed9d651fe379504e6e1f43e08d3cf401960f8
|
||||
generated: "2025-12-05T17:07:21.271934421Z"
|
||||
version: 4.4.0
|
||||
digest: sha256:3a7aa84837ff6fe008d5eb3b39aeafa0abb7be470db2b6aac78e190365a75c0c
|
||||
generated: "2025-12-02T17:18:28.155875-06:00"
|
||||
|
||||
@@ -17,6 +17,6 @@ dependencies:
|
||||
- name: app-template
|
||||
alias: kubelet-serving-cert-approver
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.5.0
|
||||
version: 4.4.0
|
||||
icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/kubernetes.png
|
||||
appVersion: 0.10.0
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user