Document dev conventions for using/avoid toYaml in templates
Summary
Document our conventions for when to use toYaml in the helm templates, and when to avoid them.
In general we want to avoid them, but enable their use in certain circumstances. We need to document why we want to avoid, them, what to try and do instead, what scenarios we still use them in, and how they should be used in those scenarios.
Context
This is an outcome from a call we had regarding using toYaml, documented here: https://docs.google.com/document/d/1BqhDPcCE5uO0mGZx1OL8CVXkqaNJ6EEk2ttgDer-jk4/edit?usp=sharing
and was triggered by this question in slack:
skarbek 8:50 AM > With regards to making changes to helm charts, and creating a template, how does one determine whether or not they should make an entire object as the variable input, or if one should take a specific configuration block and make variables for each of those items? Example i'm thinking about right now is the HPA. I'm not sure if I should create a variable for the target CPU utilization, or if i should create the entire metrics object and allow that to be configurable.