Inspiration

When I came across interview of Shimon Tolts by Kunal about Datree, It seemed interesting that he stated that K8's Admins can Prevent Kubernetes Misconfigurations From Reaching Production using Datree Policies.So I made some helpful policies to test Manifest files using Datree

What it does

Define Rolling Update Strategy : Helps in check whether K8's Cluster Admin Set all the Parameters required for rollingUpdate Deplyment revisionHistoryLimit : To check revisionHistoryLimit is set or not ? revisionHistoryLimit helps in getting previous deployment history and also helps in Rolling back to previous Deployment Pod Disruption Budget Min Available : A user should define minimum number of pods that should be active when Disruptions like deleting a pod or draining a node Pod Disruption Budget Max Unavailable : Similar to Pod Disruption Budget Min Available policy but user should define maximum number of pods that can be inactive Ensure HPA Has targetCPUUtilizationPercentage : When went through Datree Default policies for HorizontalPodAutoscaler It have policies for Max and Min Replicas but not for targetCPUUtilizationPercentage So made this Policy which gets a Threshold CPU Limit and it will Scale a Pod and Create a New Replica

How we built it

I built it Using Json Schema and Tested using Datree

Challenges we ran into

Initially I wasn't familiar with writing a JSON Schema So It is the Biggest Challenge I have ran into

Accomplishments that we're proud of

This Policies can help a lot of K8's cluster Admins

What we learned

I have learnt writing a JSON schema and Yaml files

What's next for Custom_Policies_Using_Datree

Want to publish more policies which may help others

Built With

  • datree
  • jsonschema
  • yaml
Share this project:

Updates