YAML and Kubernetes Manifests
We can’t talk about GitOps and Argo CD and not have a chapter dedicated to YAML Ain’t Markup Language (YAML). We wrote a lot of YAML in all the chapters so far, and I expect you will write a lot more if you start using Argo CD, so we are going to check some ways to statically analyze it. First, we will take a close look at the most common templating engines, Helm and Kustomize, and how we can use them in order to generate the final manifests our GitOps engine is going to apply. Then, we will look at a tool that can validate the manifests we will be creating against the Kubernetes schema. After this, we will check the most common practices to enforce on the manifests, which helps us to introduce stability and predictability into the system. And we will finish the chapter by introducing one of the most interesting tools to use in pipelines in order to perform extended checks over YAML—conftest
, which allows you to write your own rules...