From 9e4d9f9ca4c28bacd3a7c0ec13db4e37c5c2ecc3 Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sun, 18 Oct 2020 19:03:35 +0200 Subject: [PATCH] update readme --- Readme.md | 5 +++-- cmd/kubeconform/main.go | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 5af9c4b..b669046 100644 --- a/Readme.md +++ b/Readme.md @@ -11,7 +11,8 @@ 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 locations, enabling validating Kubernetes custom resources (CRDs) + * configurable list of **remote, or local schemas locations**, enabling validating Kubernetes + custom resources (CRDs) ### A small overview of Kubernetes manifest validation @@ -120,7 +121,7 @@ in a local folder - for example schemas. Then we specify this folder as an addit ``` # If the resource Kind is not found in kubernetesjsonschema.dev, also lookup in the schemas/ folder for a matching file -$ ./bin/kubeconform -registry kubernetesjsonschema.dev -schema-location 'schemas/{{ .ResourceKind }}{{ .KindSuffix }}.json' fixtures/custom-resource.yaml +$ ./bin/kubeconform -registry https://kubernetesjsonschema.dev -schema-location 'schemas/{{ .ResourceKind }}{{ .KindSuffix }}.json' fixtures/custom-resource.yaml ``` ### Converting an OpenAPI file to a JSON Schema diff --git a/cmd/kubeconform/main.go b/cmd/kubeconform/main.go index c09c68b..979b45f 100644 --- a/cmd/kubeconform/main.go +++ b/cmd/kubeconform/main.go @@ -66,7 +66,6 @@ func ValidateStream(r io.Reader, regs []registry.Registry, k8sVersion string, c return []validationResult{{err: fmt.Errorf("failed reading file: %s", err)}} } - validationResults := []validationResult{} if len(rawResources) == 0 { // In case a file has no resources, we want to capture that the file was parsed - and therefore send a message with an empty resource and no error