Compare commits

...

13 Commits

Author SHA1 Message Date
Renovate Bot
0bb4fc2a3e Update renovate/renovate Docker tag to v42.30.4
All checks were successful
Validate Kubernetes Manifests / kubeconform (pull_request) Successful in 2m13s
2025-12-03 07:47:36 +00:00
9fc89f36ef Merge pull request 'add kubeconform action' (#168) from kubeconform into main
Reviewed-on: #168
2025-12-03 07:44:28 +00:00
60a0827608 exclude system-upgrade
All checks were successful
Validate Kubernetes Manifests / kubeconform (pull_request) Successful in 2m6s
2025-12-03 13:11:45 +05:30
c65fef70ff refactor
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 2m7s
2025-12-03 13:07:22 +05:30
bb6b1680ec exclude .yaml files
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 33s
2025-12-03 13:01:24 +05:30
f3996fc632 exclude actions folder and add missing \
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 37s
2025-12-03 12:59:11 +05:30
6ab97bba0c update system-upgrade-plan to use yaml instead of yml 2025-12-03 12:47:21 +05:30
dad9ac0a27 add more schemas
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 36s
2025-12-03 12:46:53 +05:30
4b10b0cda6 remove '*.yaml' and add schemas
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 42s
2025-12-03 12:31:09 +05:30
8cf09a25a3 update kubeconform workflow to install findutils and improve manifest validation command
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 48s
2025-12-03 12:22:47 +05:30
6700fd5efc remove -kinds
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 38s
2025-12-03 12:17:07 +05:30
fec651cc0a update kubeconform workflow to use Arch Linux container and install kubeconform
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 32s
2025-12-03 12:11:35 +05:30
cbda7f9a79 add kubeconform action
Some checks failed
Validate Kubernetes Manifests / kubeconform (pull_request) Failing after 2s
2025-12-03 12:05:05 +05:30
3 changed files with 81 additions and 1 deletions

View File

@@ -0,0 +1,80 @@
name: Validate Kubernetes Manifests
on:
pull_request:
branches: [main]
jobs:
kubeconform:
runs-on: ubuntu-latest
container:
image: docker.io/archlinux/archlinux:latest
steps:
- name: Setup environment
run: |
pacman -Syu --noconfirm kubeconform git yq nodejs npm
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create kubeconform configuration
run: |
cat > /tmp/kubeconform-config.yaml << 'EOF'
schema_location:
- default
- "https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json"
EOF
- name: Validate Manifests
run: |
# Create a cache directory for schemas
mkdir -p /tmp/kubeconform-cache
# Validate manifests with proper schema resolution
find . -type f \( -name "*.yml" \) \
-not -path "./.gitea/*" \
-not -path "./clusters/default/system-upgrade/*" \
-exec sh -c '
for file do
echo "=== Validating: $file ==="
if yq -e "select(.kind == \"HelmRelease\")" "$file" >/dev/null 2>&1; then
echo "Found HelmRelease - using fluxcd schema"
kubeconform \
-schema-location "https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/helm.toolkit.fluxcd.io/helmrelease_v2.json" \
-output json \
"$file"
elif yq -e "select(.kind == \"HelmRepository\")" "$file" >/dev/null 2>&1; then
echo "Found HelmRepository - using fluxcd schema"
kubeconform \
-schema-location "https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/source.toolkit.fluxcd.io/helmrepository_v1.json" \
-output json \
"$file"
elif yq -e "select(.kind == \"L2Advertisement\")" "$file" >/dev/null 2>&1; then
echo "Found L2Advertisement - using metallb schema"
kubeconform \
-schema-location "https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/metallb.io/l2advertisement_v1beta1.json" \
-output json \
"$file"
elif yq -e "select(.kind == \"IPAddressPool\")" "$file" >/dev/null 2>&1; then
echo "Found IPAddressPool - using metallb schema"
kubeconform \
-schema-location "https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/metallb.io/ipaddresspool_v1beta1.json" \
-output json \
"$file"
elif yq -e "select(.kind == \"SealedSecret\")" "$file" >/dev/null 2>&1; then
echo "Found SealedSecret - using bitnami schema"
kubeconform \
-schema-location "https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/bitnami.com/sealedsecret_v1alpha1.json" \
-output json \
"$file"
else
echo "Validating with default schemas"
kubeconform \
-schema-location default \
-output json \
"$file"
fi
done
' sh {} +

View File

@@ -9,7 +9,7 @@ jobs:
renovate: renovate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: renovate/renovate:42.26.11 image: renovate/renovate:42.30.4
steps: steps:
- name: Checkout repository - name: Checkout repository