validate against master by default, not 1.18.0

This commit is contained in:
Yann Hamon 2021-07-11 22:53:23 +02:00
parent 0a14aae014
commit 3a697f3ce2
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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")

View file

@ -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)
}

View file

@ -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 {