Skip to content

devantler-tech/dotnet-kubernetes-validator

✅ .NET Kubernetes Validator

License Test codecov

Simple validators for client-side validation and server-side validation of Kubernetes resources.

Prerequisites

🚀 Getting Started

To get started, you can install the packages from NuGet.

dotnet add package DevantlerTech.KubernetesValidator.ClientSide.YamlSyntax
dotnet add package DevantlerTech.KubernetesValidator.ClientSide.Schemas
dotnet add package DevantlerTech.KubernetesValidator.ClientSide.Polaris

dotnet add package DevantlerTech.KubernetesValidator.ServerSide.Polaris

📝 Usage

Client-side validation

To use the client-side validators, all you need to do is to create an instance of the validator and call the Validate method with the directory path to the resources you want to validate.

using DevantlerTech.KubernetesValidator.ClientSide.YamlSyntax;

var validator = new YamlSyntaxValidator("path/to/resources");
var isValid = validator.Validate();

Server-side validation

To use the server-side validators, all you need to do is to create an instance of the validator and call the Validate method with the kubeconfig file path and the context name.

using DevantlerTech.KubernetesValidator.ServerSide.Polaris;

var validator = new PolarisValidator("path/to/kubeconfig", "context-name");
var isValid = validator.Validate();

About

Simple .NET libraries for various Kubernetes client-side and runtime validators.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 5

Languages