Ajitesh Shukla
Ajitesh Shukla

Reputation: 3

Validating deployment yaml with custom set of rules

I want to validate the deployment yaml based on certain rules on EKS. Like if there is no field of nodeselector then kubernetes should reject that deployment.

Upvotes: 0

Views: 206

Answers (1)

Fritz Duchardt
Fritz Duchardt

Reputation: 11870

Your use case is a clear fit for the Open Policy Agent.

You need to deploy it as a Validating Web Hook to your K8s cluster and configure Rego Rules to define the K8s Yaml format you want to mandate.

Upvotes: 1

Related Questions