zero-to-jupyterhub-k8s icon indicating copy to clipboard operation
zero-to-jupyterhub-k8s copied to clipboard

Simplifying Helm template helpers for labels etc.

Open minrk opened this issue 7 years ago • 1 comments
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 .matchLabels from 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.

minrk avatar Oct 09 '18 10:10 minrk

I did indeed make this too complicated to read and maintain while striving for DRY =/

consideRatio avatar Oct 09 '18 10:10 consideRatio