yannh / kubeconform

A FAST Kubernetes manifests validator, with support for Custom Resources!
Apache License 2.0
2.15k stars 121 forks source link

feat: exit early on invalid k8s version flag #210

Closed levenleven closed 8 months ago

levenleven commented 1 year ago

Exit early if provided kubernetes version is not in expected format.

Resolves https://github.com/yannh/kubeconform/issues/119

yannh commented 1 year ago

I like it, small and nice improvement :) I might add a small acceptance test before merging this.

yannh commented 1 year ago

I realised it behaves slightly differently than when passing an incorrect -schema-location - in which case it doesn't print the help, and now I am trying to see if I can implement this using the new flags.TextVar which seems like it could provide an elegant solution, but I've not played with this before :see_no_evil:

yannh commented 1 year ago

Raaaah git be damned I guess I messed up somewhere when rebasing, sorry :( Can you check the last 2 commits and lmk what you think?

levenleven commented 1 year ago

LGTM, Thanks!

yannh commented 8 months ago

merged https://github.com/yannh/kubeconform/pull/254 :+1: