Skip to content

Refactor validation script#124

Merged
stefanprodan merged 1 commit intomainfrom
validation-refactor
Feb 21, 2026
Merged

Refactor validation script#124
stefanprodan merged 1 commit intomainfrom
validation-refactor

Conversation

@stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Feb 21, 2026

The validation script should now work no matter the repo structure and its contents.

Improvements:

  • Added CLI flags: New -d/--dir to set root directory and -e/--exclude to skip specific directories, replacing the hardcoded paths
  • Added prerequisite checks: Verifies yq, kustomize, kubeconform, and curl are installed before running
  • Auto-detection of non-Kubernetes directories: Automatically skips Terraform (.tf) and Helm Chart (Chart.yaml) directories from validation
  • Downloads schemas from both flux2 and flux-operator releases, enabling validation of Flux Operator custom resources
  • Broader kubeconform coverage: Validates all Kubernetes YAML files across the repo (excluding kustomize overlays and auto-detected non-K8s dirs), not just ./clusters with a depth limit of 2
  • Hidden directory pruning: All find commands now skip dotfile directories (.github, .sops, etc.)
  • Refactored from a flat script into functions

@stefanprodan stefanprodan added the enhancement New feature or request label Feb 21, 2026
@stefanprodan stefanprodan force-pushed the validation-refactor branch 2 times, most recently from 5282b86 to e6c6275 Compare February 21, 2026 13:17
Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan merged commit 1556b42 into main Feb 21, 2026
4 checks passed
@stefanprodan stefanprodan deleted the validation-refactor branch February 21, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants