mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-11 14:09:21 +00:00
Merge pull request #62 from yannh/use-master-by-default
Validate against master by default, not 1.18.0
This commit is contained in:
commit
f8ffb2f9e3
6 changed files with 1126 additions and 89 deletions
|
|
@ -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
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func TestFromFlags(t *testing.T) {
|
|||
[]string{},
|
||||
Config{
|
||||
Files: []string{},
|
||||
KubernetesVersion: "1.18.0",
|
||||
KubernetesVersion: "master",
|
||||
NumberOfWorkers: 4,
|
||||
OutputFormat: "text",
|
||||
SchemaLocations: nil,
|
||||
|
|
@ -62,7 +62,7 @@ func TestFromFlags(t *testing.T) {
|
|||
Config{
|
||||
Files: []string{},
|
||||
Help: true,
|
||||
KubernetesVersion: "1.18.0",
|
||||
KubernetesVersion: "master",
|
||||
NumberOfWorkers: 4,
|
||||
OutputFormat: "text",
|
||||
SchemaLocations: nil,
|
||||
|
|
@ -74,7 +74,7 @@ func TestFromFlags(t *testing.T) {
|
|||
[]string{"-skip", "a,b,c"},
|
||||
Config{
|
||||
Files: []string{},
|
||||
KubernetesVersion: "1.18.0",
|
||||
KubernetesVersion: "master",
|
||||
NumberOfWorkers: 4,
|
||||
OutputFormat: "text",
|
||||
SchemaLocations: nil,
|
||||
|
|
@ -86,7 +86,7 @@ func TestFromFlags(t *testing.T) {
|
|||
[]string{"-summary", "-verbose", "file1", "file2"},
|
||||
Config{
|
||||
Files: []string{"file1", "file2"},
|
||||
KubernetesVersion: "1.18.0",
|
||||
KubernetesVersion: "master",
|
||||
NumberOfWorkers: 4,
|
||||
OutputFormat: "text",
|
||||
SchemaLocations: nil,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue