Commit 24e9ba7
committed
Fix K8s validation: use kubeconform for offline schema validation
kubectl apply --dry-run=client always contacts the API server for
resource discovery (independent of --validate=false). In CI without
a cluster this fails with "couldn't get current server API group list".
Replace the kubectl apply loop with:
1. kubectl kustomize <dir> — renders the kustomization (offline,
pure file processing).
2. kubeconform — validates rendered YAML against bundled
OpenAPI schemas (no network calls, no cluster needed).
This is the standard offline validation pattern: render with kustomize,
schema-check with kubeconform. Skip kustomization.yaml automatically
since it isn't a K8s resource (kubectl kustomize never emits it).1 parent 5b4c7ca commit 24e9ba7
1 file changed
Lines changed: 26 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
225 | 235 | | |
226 | 236 | | |
227 | 237 | | |
| |||
0 commit comments