allenporter / flux-local

flux-local is a set of tools and libraries for managing a local flux gitops repository focused on validation steps to help improve quality of commits, PRs, and general local testing.
https://allenporter.github.io/flux-local/
Apache License 2.0
146 stars 22 forks source link

Validate against k8s schema #113

Open allenporter opened 1 year ago

allenporter commented 1 year ago

Incorporate the library https://github.com/willthames/kubernetes-validate to run against the built objects and ensure they are valid k8s objects against the schema.

This likely makes sense for the test command.

This may require specifying a different k8s version to validate against, and can allow users to validate in CI

allenporter commented 1 year ago

kubeconform also looks like a way to do this: https://github.com/onedr0p/home-ops/blob/main/.github/scripts/kubeconform.sh

allenporter commented 1 year ago

More kubeconform examples: https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/scripts/validate.sh