mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-11 14:09:21 +00:00
Merge pull request #10 from yannh/rename-k8s-version-parameter
Rename k8s version parameter
This commit is contained in:
commit
bce783e12e
3 changed files with 8 additions and 8 deletions
12
Readme.md
12
Readme.md
|
|
@ -7,11 +7,11 @@ Kubeconform is a Kubernetes manifests validation tool. Build it into your CI to
|
|||
configuration using the schemas from the registry maintained by the
|
||||
[kubernetes-json-schema](https://github.com/instrumenta/kubernetes-json-schema) project!
|
||||
|
||||
It is inspired by and similar to [Kubeval](https://github.com/instrumenta/kubeval), but with the
|
||||
following improvements:
|
||||
It is inspired by, contains code from and is designed to stay close to
|
||||
[Kubeval](https://github.com/instrumenta/kubeval), but with the following improvements:
|
||||
* **high performance**: will validate & download manifests over multiple routines, caching
|
||||
downloaded files in memory
|
||||
* configurable list of schemas registries, enabling validating Kubernetes custom resources (CRDs)
|
||||
* configurable list of schemas locations, enabling validating Kubernetes custom resources (CRDs)
|
||||
|
||||
### A small overview of Kubernetes manifest validation
|
||||
|
||||
|
|
@ -36,8 +36,8 @@ $ ./bin/kubeconform -h
|
|||
Usage of ./bin/kubeconform:
|
||||
-ignore-missing-schemas
|
||||
skip files with missing schemas instead of failing
|
||||
-k8sversion string
|
||||
version of Kubernetes to test against (default "1.18.0")
|
||||
-kubernetes-sversion string
|
||||
version of Kubernetes to validate against (default "1.18.0")
|
||||
-n int
|
||||
number of routines to run in parallel (default 4)
|
||||
-output string
|
||||
|
|
@ -131,4 +131,4 @@ $ ./cmd/openapi2jsonschema/main.py https://raw.githubusercontent.com/aws/amazon-
|
|||
### Credits
|
||||
|
||||
* @garethr for the [Kubeval](https://github.com/instrumenta/kubeval) and
|
||||
[kubernetes-json-schema](https://github.com/instrumenta/kubernetes-json-schema) projects
|
||||
[kubernetes-json-schema](https://github.com/instrumenta/kubernetes-json-schema) projects ❤️
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
}
|
||||
|
||||
@test "Fail when parsing a config with additional properties and strict set" {
|
||||
run bin/kubeconform -strict -k8sversion 1.16.0 fixtures/extra_property.yaml
|
||||
run bin/kubeconform -strict -kubernetes-version 1.16.0 fixtures/extra_property.yaml
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ func realMain() int {
|
|||
var err error
|
||||
var files []string
|
||||
|
||||
flag.StringVar(&k8sVersion, "k8sversion", "1.18.0", "version of Kubernetes to test against")
|
||||
flag.StringVar(&k8sVersion, "kubernetes-version", "1.18.0", "version of Kubernetes to test against")
|
||||
flag.Var(&schemaLocationsParam, "schema-location", "override schemas location search path (can be specified multiple times)")
|
||||
flag.BoolVar(&ignoreMissingSchemas, "ignore-missing-schemas", false, "skip files with missing schemas instead of failing")
|
||||
flag.BoolVar(&summary, "summary", false, "print a summary at the end")
|
||||
|
|
|
|||
Loading…
Reference in a new issue