From f1db99db6ab7e208e28deacd9b9f41672524b571 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 30 Jun 2021 13:42:33 -0400 Subject: [PATCH 1/3] doc: add homebrew install instruction Signed-off-by: Rui Chen --- Readme.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index dee712d..f758e82 100644 --- a/Readme.md +++ b/Readme.md @@ -24,7 +24,7 @@ in a [file](https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spe the main Kubernetes repository. Because of the state of the tooling to perform validation against OpenAPI schemas, projects usually convert -the OpenAPI schemas to [JSON schemas](https://json-schema.org/) first. Kubeval relies on +the OpenAPI schemas to [JSON schemas](https://json-schema.org/) first. Kubeval relies on [instrumenta/OpenApi2JsonSchema](https://github.com/instrumenta/openapi2jsonschema) to convert Kubernetes' Swagger file and break it down into multiple JSON schemas, stored in github at [instrumenta/kubernetes-json-schema](https://github.com/instrumenta/kubernetes-json-schema) and published on @@ -45,6 +45,14 @@ validation would still error when being deployed. See for example these bugs aga bug reports is not part of Kubernetes' OpenAPI spec, and therefore kubeconform/kubeval will not detect the configuration errors. +### Installation + +If you are [Homebrew](https://brew.sh/) user, you can install by running + +```bash +$ brew install kubeconform +``` + ### Usage @@ -177,7 +185,7 @@ Here are the variables you can use in -schema-location: ### Converting an OpenAPI file to a JSON Schema Kubeconform uses JSON schemas to validate Kubernetes resources. For Custom Resource, the CustomResourceDefinition -first needs to be converted to JSON Schema. A script is provided to convert these CustomResourceDefinitions +first needs to be converted to JSON Schema. A script is provided to convert these CustomResourceDefinitions to JSON schema. Here is an example how to use it: ``` From 803bf58797c51e010ad8b1c2d90a2b6bfc6d58f9 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 1 Jul 2021 10:51:17 -0400 Subject: [PATCH 2/3] add homebrew release badge Signed-off-by: Rui Chen --- Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Readme.md b/Readme.md index f758e82..adcfb09 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,7 @@ # Kubeconform [![Build status](https://github.com/yannh/kubeconform/workflows/build/badge.svg?branch=master)](https://github.com/yannh/kubeconform/actions?query=branch%3Amaster) +[![Homebrew](https://img.shields.io/badge/dynamic/json.svg?url=https://formulae.brew.sh/api/formula/kubeconform.json&query=$.versions.stable&label=homebrew)](https://formulae.brew.sh/formula/kubeconform) [![Go Report card](https://goreportcard.com/badge/github.com/yannh/kubeconform)](https://goreportcard.com/report/github.com/yannh/kubeconform) [![PkgGoDev](https://pkg.go.dev/badge/github.com/yannh/kubeconform/pkg/validator)](https://pkg.go.dev/github.com/yannh/kubeconform/pkg/validator) From 49d434dc4a2b5f62deeccbc9e80410761325380b Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Thu, 1 Jul 2021 17:15:31 +0200 Subject: [PATCH 3/3] Update Readme.md --- Readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index adcfb09..5e213be 100644 --- a/Readme.md +++ b/Readme.md @@ -48,12 +48,13 @@ configuration errors. ### Installation -If you are [Homebrew](https://brew.sh/) user, you can install by running +If you are a [Homebrew](https://brew.sh/) user, you can install by running: ```bash $ brew install kubeconform ``` +You can also download the latest version from the [release page](https://github.com/yannh/kubeconform/releases). ### Usage