Reputation: 3
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
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