diff --git a/Readme.md b/Readme.md index 5e213be..60ea79e 100644 --- a/Readme.md +++ b/Readme.md @@ -75,7 +75,7 @@ Usage: ./bin/kubeconform [OPTION]... [FILE OR FOLDER]... -insecure-skip-tls-verify disable verification of the server's SSL certificate. This will make your HTTPS connections insecure -kubernetes-version string - version of Kubernetes to validate against (default "1.18.0") + version of Kubernetes to validate against, e.g.: 1.18.0 (default "master") -n int number of goroutines to run concurrently (default 4) -output string diff --git a/pkg/config/config.go b/pkg/config/config.go index a64dcae..d165f07 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -63,7 +63,7 @@ func FromFlags(progName string, args []string) (Config, string, error) { c := Config{} c.Files = []string{} - flags.StringVar(&c.KubernetesVersion, "kubernetes-version", "1.18.0", "version of Kubernetes to validate against") + flags.StringVar(&c.KubernetesVersion, "kubernetes-version", "master", "version of Kubernetes to validate against, e.g.: 1.18.0") flags.Var(&schemaLocationsParam, "schema-location", "override schemas location search path (can be specified multiple times)") flags.StringVar(&skipKindsCSV, "skip", "", "comma-separated list of kinds to ignore") flags.StringVar(&rejectKindsCSV, "reject", "", "comma-separated list of kinds to reject") diff --git a/pkg/registry/registry.go b/pkg/registry/registry.go index 70cd569..40f7cae 100644 --- a/pkg/registry/registry.go +++ b/pkg/registry/registry.go @@ -87,7 +87,7 @@ func New(schemaLocation string, cache string, strict bool, skipTLS bool) (Regist } // try to compile the schemaLocation template to ensure it is valid - if _, err := schemaPath(schemaLocation, "Deployment", "v1", "1.18.0", true); err != nil { + if _, err := schemaPath(schemaLocation, "Deployment", "v1", "master", true); err != nil { return nil, fmt.Errorf("failed initialising schema location registry: %s", err) } diff --git a/pkg/validator/validator.go b/pkg/validator/validator.go index c502379..256a613 100644 --- a/pkg/validator/validator.go +++ b/pkg/validator/validator.go @@ -69,7 +69,7 @@ func New(schemaLocations []string, opts Opts) (Validator, error) { } if opts.KubernetesVersion == "" { - opts.KubernetesVersion = "1.18.0" + opts.KubernetesVersion = "master" } if opts.SkipKinds == nil {