zero-to-jupyterhub-k8s
zero-to-jupyterhub-k8s copied to clipboard
Simplifying Helm template helpers for labels etc.
trafficstars
We are currently using deeply nested helpers where the same helpers produce different sets of labels in different contexts based on a variety of inputs, such as filename, local variables, etc.
I think we can greatly simplify our labeling by:
- remove most or all multi-label helpers
- remove componentLabel helper
- remove unused helpers like
nameField - remove all conditionals like
.matchLabelsfrom helpers - maybe remove all inputs from helpers
That would leave only the helpers that define common labels, such as default app, chart, heritage, etc. The rest can be implemented properly in the given template, which will be much clearer and easier to follow and manipulate.
In general, I think we should try to avoid having helpers that take input other than the global state in .Values.
I did indeed make this too complicated to read and maintain while striving for DRY =/