diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index 0c53c0c..d8bf39d 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -1,6 +1,8 @@ on: workflow_dispatch: push: + paths: + - 'site/**' branches: - master diff --git a/site/content/docs/crd-support.md b/site/content/docs/crd-support.md index 85074e7..170bd0d 100644 --- a/site/content/docs/crd-support.md +++ b/site/content/docs/crd-support.md @@ -3,7 +3,7 @@ title: "Custom Resources support" date: 2021-07-02T00:00:00Z draft: false tags: ["Kubeconform", "Usage"] -weight: 3 +weight: 4 --- When the `-schema-location` parameter is not used, or set to "default", kubeconform will default to downloading diff --git a/site/content/docs/installation.md b/site/content/docs/installation.md index b34382d..bf6695c 100644 --- a/site/content/docs/installation.md +++ b/site/content/docs/installation.md @@ -3,7 +3,7 @@ title: "Installation" date: 2021-07-02T00:00:00Z draft: false tags: ["Kubeconform", "Installation"] -weight: 1 +weight: 2 --- ## Linux @@ -25,8 +25,4 @@ Kubeconform is available to install using [Homebrew](https://brew.sh/): ## Windows -Download the latest release from our [release page](https://github.com/yannh/kubeconform/releases). - - - -You can also download the latest version from the [release page](https://github.com/yannh/kubeconform/releases). \ No newline at end of file +Download the latest release from our [release page](https://github.com/yannh/kubeconform/releases). \ No newline at end of file diff --git a/site/content/docs/json-schema-conversion.md b/site/content/docs/json-schema-conversion.md index 53884d9..f23de89 100644 --- a/site/content/docs/json-schema-conversion.md +++ b/site/content/docs/json-schema-conversion.md @@ -1,8 +1,9 @@ --- -title: "Conversion of CRD to JSON Schema" +title: "OpenAPI to JSON Schema conversion" date: 2021-07-02T00:00:00Z draft: false tags: ["Kubeconform", "Usage"] +weight: 5 --- Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition diff --git a/site/content/docs/overview.md b/site/content/docs/overview.md new file mode 100644 index 0000000..7d485b3 --- /dev/null +++ b/site/content/docs/overview.md @@ -0,0 +1,48 @@ +--- +title: "Overview" +date: 2021-07-02T00:00:00Z +draft: false +tags: ["Kubeconform", "Overview"] +weight: 1 +--- + +Kubeconform is a Kubernetes manifests validation tool. Build it into your CI to validate your Kubernetes +configuration! + +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 **remote, or local schemas locations**, enabling validating Kubernetes + custom resources (CRDs) and offline validation capabilities +* uses by default a [self-updating fork](https://github.com/yannh/kubernetes-json-schema) of the schemas registry maintained + by the [kubernetes-json-schema](https://github.com/instrumenta/kubernetes-json-schema) project - which guarantees + up-to-date **schemas for all recent versions of Kubernetes**. + +### A small overview of Kubernetes manifest validation + +Kubernetes's API is described using the [OpenAPI (formerly swagger) specification](https://www.openapis.org), +in a [file](https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/swagger.json) checked into +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 +[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 +[kubernetesjsonschema.dev](https://kubernetesjsonschema.dev/). + +Kubeconform relies on [a fork of kubernetes-json-schema](https://github.com/yannh/kubernetes-json-schema/) +that is more aggressively kept up-to-date, and contains schemas for all recent versions of Kubernetes. + +### Limits of Kubeconform validation + +Kubeconform, similarly to kubeval, only validates manifests using the OpenAPI specifications. In some +cases, the Kubernetes controllers might perform additional validation - so that manifests passing kubeval +validation would still error when being deployed. See for example these bugs against kubeval: +[#253](https://github.com/instrumenta/kubeval/issues/253) +[#256](https://github.com/instrumenta/kubeval/issues/256) +[#257](https://github.com/instrumenta/kubeval/issues/257) +[#259](https://github.com/instrumenta/kubeval/issues/259). The validation logic mentioned in these +bug reports is not part of Kubernetes' OpenAPI spec, and therefore kubeconform/kubeval will not detect the +configuration errors. \ No newline at end of file diff --git a/site/content/docs/usage-as-github-action.md b/site/content/docs/usage-as-github-action.md index 7f341dc..0313957 100644 --- a/site/content/docs/usage-as-github-action.md +++ b/site/content/docs/usage-as-github-action.md @@ -3,7 +3,7 @@ title: "Github Action" date: 2021-07-02T00:00:00Z draft: false tags: ["Kubeconform", "Usage"] -weight: 4 +weight: 6 --- Kubeconform is publishes Docker Images to Github's new Container Registry, ghcr.io. These images diff --git a/site/content/docs/usage.md b/site/content/docs/usage.md index 122dab5..0aa2a0f 100644 --- a/site/content/docs/usage.md +++ b/site/content/docs/usage.md @@ -3,7 +3,7 @@ title: "Usage" date: 2021-07-02T00:00:00Z draft: false tags: ["Kubeconform", "Usage"] -weight: 2 +weight: 3 --- {{< prism >}}$ ./bin/kubeconform -h diff --git a/site/content/docs/using-as-a-go-module.md b/site/content/docs/using-as-a-go-module.md index 1bf7f47..f7a917a 100644 --- a/site/content/docs/using-as-a-go-module.md +++ b/site/content/docs/using-as-a-go-module.md @@ -3,7 +3,7 @@ title: "Kubeconform as a Go module" date: 2021-07-02T00:00:00Z draft: false tags: ["Kubeconform", "Usage"] -weight: 5 +weight: 7 --- **Warning**: This is a work-in-progress, the interface is not yet considered stable. Feedback is encouraged. diff --git a/site/public/css/style.css b/site/public/css/style.css index 5ffd3bc..2c6b631 100644 --- a/site/public/css/style.css +++ b/site/public/css/style.css @@ -9,13 +9,13 @@ hr { border-color: #ddd; } } /* Font sizes */ -body { font-size: 1.2rem; line-height: 1.7rem; text-size-adjust: 100%; } -h1 { font-size: 2.3rem; line-height: 3.2rem; font-weight: 400 } -h2 { font-size: 1.8rem; line-height: 2.3rem; font-weight: 400 } -h3 { font-size: 1.5rem; line-height: 1.8rem; font-weight: 300 } +body { font-size: 1.4rem; line-height: 1.9rem; text-size-adjust: 100%; } +h1 { font-size: 2.7rem; line-height: 3.8rem; font-weight: 400 } +h2 { font-size: 2rem; line-height: 2.5rem; font-weight: 400 } +h3 { font-size: 1.7rem; line-height: 2rem; font-weight: 300 } -#header h1 { font-size: 3rem; line-height: 3.3rem; font-weight: 500; margin-top: 0.2em; margin-left: 30px } -#header h2 { font-size: 1.3rem; line-height: 1.5rem; font-weight: 300; font-style: italic; margin: 0 0 0.5em 30px} +#header h1 { font-size: 4rem; line-height: 4.5rem; font-weight: 500; margin-top: 0.2em; margin-left: 30px } +#header h2 { font-size: 1.7rem; line-height: 2.2rem; font-weight: 300; font-style: italic; margin: 0 0 0.5em 30px} /* We default all margins/paddings to 0 */ * { margin: 0; padding: 0 } @@ -131,7 +131,7 @@ pre { #motto { text-align: center; font-style: italic; - font-size: 1.1em; + font-size: 1.4em; margin: 2em auto 2em auto; } @@ -155,13 +155,13 @@ pre { } #kc-pros h2 { - font-size: 1.2em; + font-size: 1.4em; line-height: 1.2em; padding: 0 5% 0.3em 5%; } #kc-pros p { - font-size: 0.9em; + font-size: 1.1em; padding: 0 5% 2em 5%; } diff --git a/site/public/docs/crd-support/index.html b/site/public/docs/crd-support/index.html index 89123e7..d80eb7d 100644 --- a/site/public/docs/crd-support/index.html +++ b/site/public/docs/crd-support/index.html @@ -17,27 +17,29 @@
@@ -84,11 +86,11 @@ Summary: 1 resource found in 1 file - Valid: 1, Invalid: 0, Errors: 0 Skipped: 0
diff --git a/site/public/docs/index.xml b/site/public/docs/index.xml index 3e920bc..eb166c9 100644 --- a/site/public/docs/index.xml +++ b/site/public/docs/index.xml @@ -7,6 +7,17 @@ Hugo -- gohugo.io en-us Fri, 02 Jul 2021 00:00:00 +0000 + + Overview + http://kubeconform.mandragor.org/docs/overview/ + Fri, 02 Jul 2021 00:00:00 +0000 + + http://kubeconform.mandragor.org/docs/overview/ + Kubeconform is a Kubernetes manifests validation tool. Build it into your CI to validate your Kubernetes configuration! +It is inspired by, contains code from and is designed to stay close to Kubeval, but with the following improvements: + high performance: will validate &amp; download manifests over multiple routines, caching downloaded files in memory configurable list of remote, or local schemas locations, enabling validating Kubernetes custom resources (CRDs) and offline validation capabilities uses by default a self-updating fork of the schemas registry maintained by the kubernetes-json-schema project - which guarantees up-to-date schemas for all recent versions of Kubernetes. + + Installation http://kubeconform.mandragor.org/docs/installation/ @@ -16,8 +27,7 @@ Linux Download the latest release from our release page. For example, for Linux on x86_64 architecture: curl -L https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar xvzf - && \ sudo mv kubeconform /usr/local/bin/ MacOs Kubeconform is available to install using Homebrew: $ brew install kubeconform -Windows Download the latest release from our release page. -You can also download the latest version from the release page. +Windows Download the latest release from our release page. @@ -39,6 +49,16 @@ You can also download the latest version from the release page. If the -schema-location value does not end with &lsquo;.json&rsquo;, Kubeconform will assume filenames / a file structure identical to that of kubernetesjsonschema. + + OpenAPI to JSON Schema conversion + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + Fri, 02 Jul 2021 00:00:00 +0000 + + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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: +#!/bin/bash $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-sagemaker-operator-for-k8s/master/config/crd/bases/sagemaker.aws.amazon.com_trainingjobs.yaml JSON schema written to trainingjob_v1.json The FILENAME_FORMAT environment variable can be used to change the output file name (Available variables: kind, group, version) (Default: {kind}_{version}). + + Github Action http://kubeconform.mandragor.org/docs/usage-as-github-action/ @@ -60,15 +80,5 @@ Kubeconform contains a package that can be used as a library. An example of usag Additional documentation on pkg.go.dev - - Conversion of CRD to JSON Schema - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - Fri, 02 Jul 2021 00:00:00 +0000 - - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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: -#!/bin/bash $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-sagemaker-operator-for-k8s/master/config/crd/bases/sagemaker.aws.amazon.com_trainingjobs.yaml JSON schema written to trainingjob_v1.json The FILENAME_FORMAT environment variable can be used to change the output file name (Available variables: kind, group, version) (Default: {kind}_{version}). - - diff --git a/site/public/docs/installation/index.html b/site/public/docs/installation/index.html index 748883e..f7c3fb4 100644 --- a/site/public/docs/installation/index.html +++ b/site/public/docs/installation/index.html @@ -17,25 +17,29 @@
@@ -55,14 +59,15 @@ sudo mv kubeconform /usr/local/bin/

Windows

Download the latest release from our release page.

-

You can also download the latest version from the release page.

diff --git a/site/public/docs/json-schema-conversion/index.html b/site/public/docs/json-schema-conversion/index.html index 01c261a..330a3b6 100644 --- a/site/public/docs/json-schema-conversion/index.html +++ b/site/public/docs/json-schema-conversion/index.html @@ -3,7 +3,7 @@ - Kubeconform - Fast Kubernetes manifests validation! | Conversion of CRD to JSON Schema + Kubeconform - Fast Kubernetes manifests validation! | OpenAPI to JSON Schema conversion
-

Conversion of CRD to JSON Schema

+

OpenAPI to JSON Schema conversion

Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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:

@@ -60,9 +64,11 @@ JSON schema written to trainingjob-sagemaker-v1.json
diff --git a/site/public/docs/usage-as-github-action/index.html b/site/public/docs/usage-as-github-action/index.html index 437cbd0..b233def 100644 --- a/site/public/docs/usage-as-github-action/index.html +++ b/site/public/docs/usage-as-github-action/index.html @@ -17,27 +17,29 @@
@@ -69,11 +71,11 @@ case, I might publish the Docker image to a different platform.

diff --git a/site/public/docs/usage/index.html b/site/public/docs/usage/index.html index b5c411c..0d61851 100644 --- a/site/public/docs/usage/index.html +++ b/site/public/docs/usage/index.html @@ -17,27 +17,29 @@
@@ -125,11 +127,11 @@ Summary: 65 resources found in 34 files - Valid: 55, Invalid: 2, Errors: 8 Skipp
diff --git a/site/public/docs/using-as-a-go-module/index.html b/site/public/docs/using-as-a-go-module/index.html index 1763ee2..0c3a879 100644 --- a/site/public/docs/using-as-a-go-module/index.html +++ b/site/public/docs/using-as-a-go-module/index.html @@ -17,27 +17,27 @@
diff --git a/site/public/index.xml b/site/public/index.xml index 1a54798..12a4237 100644 --- a/site/public/index.xml +++ b/site/public/index.xml @@ -7,6 +7,17 @@ Hugo -- gohugo.io en-us Fri, 02 Jul 2021 00:00:00 +0000 + + Overview + http://kubeconform.mandragor.org/docs/overview/ + Fri, 02 Jul 2021 00:00:00 +0000 + + http://kubeconform.mandragor.org/docs/overview/ + Kubeconform is a Kubernetes manifests validation tool. Build it into your CI to validate your Kubernetes configuration! +It is inspired by, contains code from and is designed to stay close to Kubeval, but with the following improvements: + high performance: will validate &amp; download manifests over multiple routines, caching downloaded files in memory configurable list of remote, or local schemas locations, enabling validating Kubernetes custom resources (CRDs) and offline validation capabilities uses by default a self-updating fork of the schemas registry maintained by the kubernetes-json-schema project - which guarantees up-to-date schemas for all recent versions of Kubernetes. + + Installation http://kubeconform.mandragor.org/docs/installation/ @@ -16,8 +27,7 @@ Linux Download the latest release from our release page. For example, for Linux on x86_64 architecture: curl -L https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar xvzf - && \ sudo mv kubeconform /usr/local/bin/ MacOs Kubeconform is available to install using Homebrew: $ brew install kubeconform -Windows Download the latest release from our release page. -You can also download the latest version from the release page. +Windows Download the latest release from our release page. @@ -39,6 +49,16 @@ You can also download the latest version from the release page. If the -schema-location value does not end with &lsquo;.json&rsquo;, Kubeconform will assume filenames / a file structure identical to that of kubernetesjsonschema. + + OpenAPI to JSON Schema conversion + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + Fri, 02 Jul 2021 00:00:00 +0000 + + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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: +#!/bin/bash $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-sagemaker-operator-for-k8s/master/config/crd/bases/sagemaker.aws.amazon.com_trainingjobs.yaml JSON schema written to trainingjob_v1.json The FILENAME_FORMAT environment variable can be used to change the output file name (Available variables: kind, group, version) (Default: {kind}_{version}). + + Github Action http://kubeconform.mandragor.org/docs/usage-as-github-action/ @@ -71,15 +91,5 @@ It is inspired by, contains code from and is designed to stay close to Kubeval, high performance: will validate &amp; download manifests over multiple routines, caching downloaded files in memory configurable list of remote, or local schemas locations, enabling validating Kubernetes custom resources (CRDs) and offline validation capabilities uses by default a self-updating fork of the schemas registry maintained by the kubernetes-json-schema project - which guarantees up-to-date schemas for all recent versions of Kubernetes. - - Conversion of CRD to JSON Schema - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - Fri, 02 Jul 2021 00:00:00 +0000 - - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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: -#!/bin/bash $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-sagemaker-operator-for-k8s/master/config/crd/bases/sagemaker.aws.amazon.com_trainingjobs.yaml JSON schema written to trainingjob_v1.json The FILENAME_FORMAT environment variable can be used to change the output file name (Available variables: kind, group, version) (Default: {kind}_{version}). - - diff --git a/site/public/sitemap.xml b/site/public/sitemap.xml index 68547a8..dd852bd 100644 --- a/site/public/sitemap.xml +++ b/site/public/sitemap.xml @@ -2,6 +2,9 @@ + http://kubeconform.mandragor.org/docs/overview/ + 2021-07-02T00:00:00+00:00 + http://kubeconform.mandragor.org/docs/installation/ 2021-07-02T00:00:00+00:00 @@ -10,6 +13,9 @@ http://kubeconform.mandragor.org/docs/crd-support/ 2021-07-02T00:00:00+00:00 + + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + 2021-07-02T00:00:00+00:00 http://kubeconform.mandragor.org/docs/usage-as-github-action/ 2021-07-02T00:00:00+00:00 @@ -22,9 +28,6 @@ http://kubeconform.mandragor.org/about/ 2021-07-02T00:00:00+00:00 - - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - 2021-07-02T00:00:00+00:00 http://kubeconform.mandragor.org/docs/ 2021-07-02T00:00:00+00:00 @@ -37,6 +40,9 @@ http://kubeconform.mandragor.org/ 2021-07-02T00:00:00+00:00 + + http://kubeconform.mandragor.org/tags/overview/ + 2021-07-02T00:00:00+00:00 http://kubeconform.mandragor.org/tags/ 2021-07-02T00:00:00+00:00 diff --git a/site/public/tags/index.xml b/site/public/tags/index.xml index b276b36..19353e3 100644 --- a/site/public/tags/index.xml +++ b/site/public/tags/index.xml @@ -34,6 +34,15 @@ + + Overview + http://kubeconform.mandragor.org/tags/overview/ + Fri, 02 Jul 2021 00:00:00 +0000 + + http://kubeconform.mandragor.org/tags/overview/ + + + Usage http://kubeconform.mandragor.org/tags/usage/ diff --git a/site/public/tags/installation/index.xml b/site/public/tags/installation/index.xml index 68a95d7..f3f29c2 100644 --- a/site/public/tags/installation/index.xml +++ b/site/public/tags/installation/index.xml @@ -16,8 +16,7 @@ Linux Download the latest release from our release page. For example, for Linux on x86_64 architecture: curl -L https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar xvzf - && \ sudo mv kubeconform /usr/local/bin/ MacOs Kubeconform is available to install using Homebrew: $ brew install kubeconform -Windows Download the latest release from our release page. -You can also download the latest version from the release page. +Windows Download the latest release from our release page. diff --git a/site/public/tags/kubeconform/index.xml b/site/public/tags/kubeconform/index.xml index 1e248cc..94e6880 100644 --- a/site/public/tags/kubeconform/index.xml +++ b/site/public/tags/kubeconform/index.xml @@ -7,6 +7,17 @@ Hugo -- gohugo.io en-us Fri, 02 Jul 2021 00:00:00 +0000 + + Overview + http://kubeconform.mandragor.org/docs/overview/ + Fri, 02 Jul 2021 00:00:00 +0000 + + http://kubeconform.mandragor.org/docs/overview/ + Kubeconform is a Kubernetes manifests validation tool. Build it into your CI to validate your Kubernetes configuration! +It is inspired by, contains code from and is designed to stay close to Kubeval, but with the following improvements: + high performance: will validate &amp; download manifests over multiple routines, caching downloaded files in memory configurable list of remote, or local schemas locations, enabling validating Kubernetes custom resources (CRDs) and offline validation capabilities uses by default a self-updating fork of the schemas registry maintained by the kubernetes-json-schema project - which guarantees up-to-date schemas for all recent versions of Kubernetes. + + Installation http://kubeconform.mandragor.org/docs/installation/ @@ -16,8 +27,7 @@ Linux Download the latest release from our release page. For example, for Linux on x86_64 architecture: curl -L https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar xvzf - && \ sudo mv kubeconform /usr/local/bin/ MacOs Kubeconform is available to install using Homebrew: $ brew install kubeconform -Windows Download the latest release from our release page. -You can also download the latest version from the release page. +Windows Download the latest release from our release page. @@ -39,6 +49,16 @@ You can also download the latest version from the release page. If the -schema-location value does not end with &lsquo;.json&rsquo;, Kubeconform will assume filenames / a file structure identical to that of kubernetesjsonschema. + + OpenAPI to JSON Schema conversion + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + Fri, 02 Jul 2021 00:00:00 +0000 + + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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: +#!/bin/bash $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-sagemaker-operator-for-k8s/master/config/crd/bases/sagemaker.aws.amazon.com_trainingjobs.yaml JSON schema written to trainingjob_v1.json The FILENAME_FORMAT environment variable can be used to change the output file name (Available variables: kind, group, version) (Default: {kind}_{version}). + + Github Action http://kubeconform.mandragor.org/docs/usage-as-github-action/ @@ -71,15 +91,5 @@ It is inspired by, contains code from and is designed to stay close to Kubeval, high performance: will validate &amp; download manifests over multiple routines, caching downloaded files in memory configurable list of remote, or local schemas locations, enabling validating Kubernetes custom resources (CRDs) and offline validation capabilities uses by default a self-updating fork of the schemas registry maintained by the kubernetes-json-schema project - which guarantees up-to-date schemas for all recent versions of Kubernetes. - - Conversion of CRD to JSON Schema - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - Fri, 02 Jul 2021 00:00:00 +0000 - - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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: -#!/bin/bash $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-sagemaker-operator-for-k8s/master/config/crd/bases/sagemaker.aws.amazon.com_trainingjobs.yaml JSON schema written to trainingjob_v1.json The FILENAME_FORMAT environment variable can be used to change the output file name (Available variables: kind, group, version) (Default: {kind}_{version}). - - diff --git a/site/public/tags/usage/index.xml b/site/public/tags/usage/index.xml index 508a98a..31f13a9 100644 --- a/site/public/tags/usage/index.xml +++ b/site/public/tags/usage/index.xml @@ -26,6 +26,16 @@ If the -schema-location value does not end with &lsquo;.json&rsquo;, Kubeconform will assume filenames / a file structure identical to that of kubernetesjsonschema. + + OpenAPI to JSON Schema conversion + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + Fri, 02 Jul 2021 00:00:00 +0000 + + http://kubeconform.mandragor.org/docs/json-schema-conversion/ + Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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: +#!/bin/bash $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-sagemaker-operator-for-k8s/master/config/crd/bases/sagemaker.aws.amazon.com_trainingjobs.yaml JSON schema written to trainingjob_v1.json The FILENAME_FORMAT environment variable can be used to change the output file name (Available variables: kind, group, version) (Default: {kind}_{version}). + + Github Action http://kubeconform.mandragor.org/docs/usage-as-github-action/ @@ -47,15 +57,5 @@ Kubeconform contains a package that can be used as a library. An example of usag Additional documentation on pkg.go.dev - - Conversion of CRD to JSON Schema - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - Fri, 02 Jul 2021 00:00:00 +0000 - - http://kubeconform.mandragor.org/docs/json-schema-conversion/ - Kubeconform uses JSON schemas to validate Kubernetes resources. For custom resources, the CustomResourceDefinition 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: -#!/bin/bash $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-sagemaker-operator-for-k8s/master/config/crd/bases/sagemaker.aws.amazon.com_trainingjobs.yaml JSON schema written to trainingjob_v1.json The FILENAME_FORMAT environment variable can be used to change the output file name (Available variables: kind, group, version) (Default: {kind}_{version}). - - diff --git a/site/themes/kubeconform/layouts/_default/single.html b/site/themes/kubeconform/layouts/_default/single.html index cd9b31d..e5fc313 100644 --- a/site/themes/kubeconform/layouts/_default/single.html +++ b/site/themes/kubeconform/layouts/_default/single.html @@ -1,10 +1,10 @@ {{ define "main" }} @@ -15,10 +15,10 @@
diff --git a/site/themes/kubeconform/static/css/style.css b/site/themes/kubeconform/static/css/style.css index 5ffd3bc..2c6b631 100644 --- a/site/themes/kubeconform/static/css/style.css +++ b/site/themes/kubeconform/static/css/style.css @@ -9,13 +9,13 @@ hr { border-color: #ddd; } } /* Font sizes */ -body { font-size: 1.2rem; line-height: 1.7rem; text-size-adjust: 100%; } -h1 { font-size: 2.3rem; line-height: 3.2rem; font-weight: 400 } -h2 { font-size: 1.8rem; line-height: 2.3rem; font-weight: 400 } -h3 { font-size: 1.5rem; line-height: 1.8rem; font-weight: 300 } +body { font-size: 1.4rem; line-height: 1.9rem; text-size-adjust: 100%; } +h1 { font-size: 2.7rem; line-height: 3.8rem; font-weight: 400 } +h2 { font-size: 2rem; line-height: 2.5rem; font-weight: 400 } +h3 { font-size: 1.7rem; line-height: 2rem; font-weight: 300 } -#header h1 { font-size: 3rem; line-height: 3.3rem; font-weight: 500; margin-top: 0.2em; margin-left: 30px } -#header h2 { font-size: 1.3rem; line-height: 1.5rem; font-weight: 300; font-style: italic; margin: 0 0 0.5em 30px} +#header h1 { font-size: 4rem; line-height: 4.5rem; font-weight: 500; margin-top: 0.2em; margin-left: 30px } +#header h2 { font-size: 1.7rem; line-height: 2.2rem; font-weight: 300; font-style: italic; margin: 0 0 0.5em 30px} /* We default all margins/paddings to 0 */ * { margin: 0; padding: 0 } @@ -131,7 +131,7 @@ pre { #motto { text-align: center; font-style: italic; - font-size: 1.1em; + font-size: 1.4em; margin: 2em auto 2em auto; } @@ -155,13 +155,13 @@ pre { } #kc-pros h2 { - font-size: 1.2em; + font-size: 1.4em; line-height: 1.2em; padding: 0 5% 0.3em 5%; } #kc-pros p { - font-size: 0.9em; + font-size: 1.1em; padding: 0 5% 2em 5%; }