Skip to content

Commit 4495c8b

Browse files
fix(ci): exclude Helm values files from kubeconform by name
The first validate run failed: k8s/temporal/helm-values.yaml has no `kind` (it is Helm chart input, not a k8s object) and the `*-ha/values.yaml` path filter didn't catch it. Exclude `values.yaml` + `helm-values.yaml` by name instead — covers every Helm values file regardless of directory. Applied to both the validate workflow and apply.yml's validate job + apply file list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e37248f commit 4495c8b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/apply.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
curl -sSL "https://github.com/yannh/kubeconform/releases/download/${VER}/kubeconform-linux-amd64.tar.gz" \
6868
| tar -xz -C /usr/local/bin kubeconform
6969
mapfile -t FILES < <(find "${K8S_DIR}" -type f \( -name '*.yaml' -o -name '*.yml' \) \
70-
! -path '*-ha/values.yaml' | sort)
70+
! -name 'values.yaml' ! -name 'helm-values.yaml' | sort)
7171
kubeconform -strict -ignore-missing-schemas -kubernetes-version 1.31.0 -summary "${FILES[@]}"
7272
7373
apply:
@@ -125,7 +125,7 @@ jobs:
125125
for e in "${EXCLUDE[@]}"; do [ "$f" = "$e" ] && skip=true && break; done
126126
$skip || KEEP+=("$f")
127127
done < <(find "${K8S_DIR}" -type f \( -name '*.yaml' -o -name '*.yml' \) \
128-
! -path '*-ha/values.yaml' | sort)
128+
! -name 'values.yaml' ! -name 'helm-values.yaml' | sort)
129129
echo "Will apply ${#KEEP[@]} manifest(s); excluded ${#EXCLUDE[@]} (secrets + service Deployments)."
130130
printf '%s\n' "${KEEP[@]}" > /tmp/apply-files.txt
131131
printf ' apply: %s\n' "${KEEP[@]}"

.github/workflows/validate.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ jobs:
6666
- name: kubeconform schema validation
6767
run: |
6868
set -euo pipefail
69-
# Exclude Helm values files (k8s/data/*-ha/values.yaml) — those
70-
# are Helm chart inputs, not Kubernetes objects, so they have no
71-
# k8s schema to check against.
69+
# Exclude Helm values files (values.yaml / helm-values.yaml) —
70+
# those are Helm chart inputs, not Kubernetes objects, so they
71+
# have no `kind` and no k8s schema to check against.
7272
# -ignore-missing-schemas: CRDs (cert-manager, Cilium, CNPG)
7373
# have no built-in schema; skip them rather than fail.
7474
# -strict: reject unknown/duplicate fields in core objects.
7575
mapfile -t FILES < <(find k8s -type f \( -name '*.yaml' -o -name '*.yml' \) \
76-
! -path '*-ha/values.yaml' | sort)
76+
! -name 'values.yaml' ! -name 'helm-values.yaml' | sort)
7777
echo "validating ${#FILES[@]} manifest(s):"
7878
printf ' %s\n' "${FILES[@]}"
7979
kubeconform \

0 commit comments

Comments
 (0)